Add support for Elasticsearch sniffer
Closes gh-24174
This commit is contained in:
@@ -4983,6 +4983,19 @@ To take full control over the registration, define a `RestClientBuilder` bean.
|
||||
|
||||
TIP: If your application needs access to a "Low Level" `RestClient`, you can get it by calling `client.getLowLevelClient()` on the auto-configured `RestHighLevelClient`.
|
||||
|
||||
Additionally, if `elasticsearch-rest-client-sniffer` is on the classpath, a `Sniffer` is auto-configured to automatically discover nodes from a running Elasticsearch cluster and set them to the `RestHighLevelClient` bean.
|
||||
You can further tune how `Sniffer` is configured, as shown in the following example:
|
||||
|
||||
[source,yaml,indent=0,configprops,configblocks]
|
||||
----
|
||||
spring:
|
||||
elasticsearch:
|
||||
rest:
|
||||
sniffer:
|
||||
interval: 10m
|
||||
delay-after-failure: 30s
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[boot-features-connecting-to-elasticsearch-reactive-rest]]
|
||||
|
||||
Reference in New Issue
Block a user