[
https://issues.apache.org/jira/browse/CAMEL-27951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27951:
--------------------------------
Description:
Found while improving the option descriptions of
camel-elasticsearch-rest-client for CAMEL-23832 (commit
https://github.com/apache/camel/commit/bad83878ac9bc088cb788df6bdc3ddc8def71f1a,
pull request https://github.com/apache/camel/pull/31192).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. sniffAfterFailureDelay has no effect
{{ElasticsearchRestClientProducer.createClient}} never registers a
SniffOnFailureListener on the RestClient, so Sniffer.sniffOnFailure() is never
called and the nodes are only read at snifferInterval.
Proposed change: create a SniffOnFailureListener, setFailureListener before
build(), then listener.setSniffer(sniffer), as camel-elasticsearch does.
h4. 2. Smaller issues
clusterName: ElasticsearchRestClientComponent.createEndpoint never calls
setClusterName(remaining), so it is always null (nothing reads it). SEARCH with
a Map body only works with String values (ClassCastException otherwise). The
CamelElasticsearchOperation header overrides the operation option, while the
indexName option overrides the CamelElasticsearchIndexName header. The doc page
intro says "ElasticSearch 8.x API" while the module uses the 9.x low-level
client.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of
camel-elasticsearch-rest-client for CAMEL-23832 (pull request
https://github.com/apache/camel/pull/31192).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. sniffAfterFailureDelay has no effect
{{ElasticsearchRestClientProducer.createClient}} never registers a
SniffOnFailureListener on the RestClient, so Sniffer.sniffOnFailure() is never
called and the nodes are only read at snifferInterval.
Proposed change: create a SniffOnFailureListener, setFailureListener before
build(), then listener.setSniffer(sniffer), as camel-elasticsearch does.
h4. 2. Smaller issues
clusterName: ElasticsearchRestClientComponent.createEndpoint never calls
setClusterName(remaining), so it is always null (nothing reads it). SEARCH with
a Map body only works with String values (ClassCastException otherwise). The
CamelElasticsearchOperation header overrides the operation option, while the
indexName option overrides the CamelElasticsearchIndexName header. The doc page
intro says "ElasticSearch 8.x API" while the module uses the 9.x low-level
client.
_Claude Code on behalf of davsclaus_
> camel-elasticsearch-rest-client: sniffAfterFailureDelay has no effect,
> clusterName is never set
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-27951
> URL: https://issues.apache.org/jira/browse/CAMEL-27951
> Project: Camel
> Issue Type: Bug
> Components: camel-elasticsearch
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of
> camel-elasticsearch-rest-client for CAMEL-23832 (commit
> https://github.com/apache/camel/commit/bad83878ac9bc088cb788df6bdc3ddc8def71f1a,
> pull request https://github.com/apache/camel/pull/31192).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. sniffAfterFailureDelay has no effect
> {{ElasticsearchRestClientProducer.createClient}} never registers a
> SniffOnFailureListener on the RestClient, so Sniffer.sniffOnFailure() is
> never called and the nodes are only read at snifferInterval.
> Proposed change: create a SniffOnFailureListener, setFailureListener before
> build(), then listener.setSniffer(sniffer), as camel-elasticsearch does.
> h4. 2. Smaller issues
> clusterName: ElasticsearchRestClientComponent.createEndpoint never calls
> setClusterName(remaining), so it is always null (nothing reads it). SEARCH
> with a Map body only works with String values (ClassCastException otherwise).
> The CamelElasticsearchOperation header overrides the operation option, while
> the indexName option overrides the CamelElasticsearchIndexName header. The
> doc page intro says "ElasticSearch 8.x API" while the module uses the 9.x
> low-level client.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)