@@ -389,6 +389,63 @@ ClientConfiguration.builder()
389
389
----
390
390
====
391
391
392
+ [[elasticsearch.clients.configurationcallbacks.connectionconfig]]
393
+ ==== Configuration of the ConnectionConfig used by the low level Elasticsearch `Rest5Client`:
394
+
395
+ This callback provides a `org.apache.hc.client5.http.config.ConnectionConfig` to configure the connection that is
396
+ used by the `Rest5Client`.
397
+
398
+ ====
399
+ [source,java]
400
+ ----
401
+ ClientConfiguration.builder()
402
+ .connectedTo("localhost:9200", "localhost:9291")
403
+ .withClientConfigurer(Rest5Clients.ElasticsearchConnectionConfigurationCallback.from(connectionConfigBuilder -> {
404
+ // configure the connection
405
+ return connectionConfigBuilder;
406
+ }))
407
+ .build();
408
+ ----
409
+ ====
410
+
411
+ [[elasticsearch.clients.configurationcallbacks.connectioncmanager]]
412
+ ==== Configuration of the ConnectionManager used by the low level Elasticsearch `Rest5Client`:
413
+
414
+ This callback provides a `org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder` to configure the connection manager that is
415
+ used by the `Rest5Client`.
416
+
417
+ ====
418
+ [source,java]
419
+ ----
420
+ ClientConfiguration.builder()
421
+ .connectedTo("localhost:9200", "localhost:9291")
422
+ .withClientConfigurer(Rest5Clients.ElasticsearchConnectionManagerCallback.from(connectionManagerBuilder -> {
423
+ // configure the connection manager
424
+ return connectionManagerBuilder;
425
+ }))
426
+ .build();
427
+ ----
428
+ ====
429
+
430
+ [[elasticsearch.clients.configurationcallbacks.requestconfig]]
431
+ ==== Configuration of the RequestConfig used by the low level Elasticsearch `Rest5Client`:
432
+
433
+ This callback provides a `org.apache.hc.client5.http.config.RequestConfig` to configure the RequestConfig that is
434
+ used by the `Rest5Client`.
435
+
436
+ ====
437
+ [source,java]
438
+ ----
439
+ ClientConfiguration.builder()
440
+ .connectedTo("localhost:9200", "localhost:9291")
441
+ .withClientConfigurer(Rest5Clients.ElasticsearchRequestConfigCallback.from(requestConfigBuilder -> {
442
+ // configure the request config
443
+ return requestConfigBuilder;
444
+ }))
445
+ .build();
446
+ ----
447
+ ====
448
+
392
449
[[elasticsearch.clients.logging]]
393
450
== Client Logging
394
451
0 commit comments