OpenSearch
Index, update, get, search and delete documents and indices in OpenSearch with the OpenSearch Java client.
What’s inside
-
OpenSearch component, URI syntax:
opensearch:clusterName
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-opensearch-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 18 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.opensearch.api-key | API key to authenticate with, sent in the Authorization header instead of a user and password: the token OpenSearch returns when the key is created (it starts with os_), as is. API keys need OpenSearch 3.7 or newer. The key is only sent to the configured hosts and the nodes found by the sniffer. Not used when the client or openSearchClient option is set. | String | |
camel.component.opensearch.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.opensearch.client | To use an existing org.opensearch.client.RestClient, shared by all the endpoints of the component, instead of a client that each producer creates. The hostAddresses, timeout, authentication, SSL, sniffer and disconnect options are then not used, and the producers do not close the client. The openSearchClient option takes precedence over it. The option is a org.opensearch.client.RestClient type. | RestClient | |
camel.component.opensearch.connection-timeout | The connect timeout in milliseconds: the longest time that the client waits to establish the connection to a node. Not used when the client or openSearchClient option is set. | 30000 | Integer |
camel.component.opensearch.enable-s-s-l | Whether to connect to the nodes of hostAddresses with HTTPS instead of HTTP. The default SSLContext of the JVM is used unless sslContextParameters, or the certificatePath option of the endpoint, is set. | false | Boolean |
camel.component.opensearch.enable-sniffer | Whether to start the Sniffer of the OpenSearch REST client, which reads the nodes of the cluster from its Nodes Info API at an interval and updates the nodes that the client uses. Not used when the client or openSearchClient option is set. | false | Boolean |
camel.component.opensearch.enabled | Whether to enable auto configuration of the opensearch component. This is enabled by default. | Boolean | |
camel.component.opensearch.host-addresses | The comma-separated list of the nodes to connect to, each as host:port, for example os1:9200,os2:9200. The port is 9200 if not set, and the scheme is https when enableSSL is set. Required unless the client or openSearchClient option is set. | String | |
camel.component.opensearch.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.opensearch.open-search-client | To use an existing org.opensearch.client.opensearch.OpenSearchClient, shared by all the endpoints of the component that do not set their own, instead of a client that each producer creates. It takes precedence over the client option. The hostAddresses, timeout, authentication, SSL, sniffer and disconnect options are then not used, and the producers do not close the client. The option is a org.opensearch.client.opensearch.OpenSearchClient type. | OpenSearchClient | |
camel.component.opensearch.password | The password for HTTP basic authentication to the nodes, used only together with user. Not used when the client or openSearchClient option is set. | String | |
camel.component.opensearch.sniff-after-failure-delay | The delay in milliseconds of the read of the nodes that the Sniffer schedules after a failed request. The component does not register the client listener that reports failures to the Sniffer, so this option has no effect. | 60000 | Integer |
camel.component.opensearch.sniffer-interval | The interval in milliseconds between two reads of the nodes of the cluster, when enableSniffer is set. It must be greater than 0. | 300000 | Integer |
camel.component.opensearch.socket-timeout | The socket timeout in milliseconds: the longest time that the client waits for data from a node before the request fails. Not used when the client or openSearchClient option is set. | 30000 | Integer |
camel.component.opensearch.ssl-context-parameters | To configure security using SSLContextParameters, which sets the protocols, cipher suites, named groups and signature schemes of the HTTPS connection. It takes precedence over the certificatePath option of the endpoint, and it needs enableSSL. The option is a org.apache.camel.support.jsse.SSLContextParameters type. | SSLContextParameters | |
camel.component.opensearch.use-global-ssl-context-parameters | Whether to use the global SSLContextParameters of the CamelContext for an endpoint that has no sslContextParameters. | false | Boolean |
camel.component.opensearch.user | The user name for HTTP basic authentication to the nodes, used only together with password. It cannot be combined with apiKey. Not used when the client or openSearchClient option is set. | String | |
camel.component.opensearch.max-retry-timeout | Deprecated: this option has no effect. It was used by the old low-level REST client and is ignored by the current client. | 30000 | Integer |