You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/11/15 18:15:22 UTC

[camel] 01/02: camel-elasticsearch - Polished

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 292b4f9129d91fb8274c942edbf4ea0ee0d60415
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Nov 15 19:13:48 2021 +0100

    camel-elasticsearch - Polished
---
 .../ElasticsearchComponentConfigurer.java          |  12 +-
 .../elasticsearch/elasticsearch-rest.json          |  20 +-
 .../elasticsearch/ElasticsearchComponent.java      |  39 ++--
 .../elasticsearch/ElasticsearchConfiguration.java  |   6 +-
 .../ElasticsearchRestComponentBuilderFactory.java  | 151 +++++++-------
 .../dsl/ElasticsearchEndpointBuilderFactory.java   | 223 +++++++++++----------
 6 files changed, 233 insertions(+), 218 deletions(-)

diff --git a/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java b/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java
index 6f97801..b18eb19 100644
--- a/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java
+++ b/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java
@@ -27,9 +27,9 @@ public class ElasticsearchComponentConfigurer extends PropertyConfigurerSupport
         case "connectiontimeout":
         case "connectionTimeout": target.setConnectionTimeout(property(camelContext, int.class, value)); return true;
         case "enablessl":
-        case "enableSSL": target.setEnableSSL(property(camelContext, java.lang.Boolean.class, value)); return true;
+        case "enableSSL": target.setEnableSSL(property(camelContext, boolean.class, value)); return true;
         case "enablesniffer":
-        case "enableSniffer": target.setEnableSniffer(property(camelContext, java.lang.Boolean.class, value)); return true;
+        case "enableSniffer": target.setEnableSniffer(property(camelContext, boolean.class, value)); return true;
         case "hostaddresses":
         case "hostAddresses": target.setHostAddresses(property(camelContext, java.lang.String.class, value)); return true;
         case "lazystartproducer":
@@ -62,9 +62,9 @@ public class ElasticsearchComponentConfigurer extends PropertyConfigurerSupport
         case "connectiontimeout":
         case "connectionTimeout": return int.class;
         case "enablessl":
-        case "enableSSL": return java.lang.Boolean.class;
+        case "enableSSL": return boolean.class;
         case "enablesniffer":
-        case "enableSniffer": return java.lang.Boolean.class;
+        case "enableSniffer": return boolean.class;
         case "hostaddresses":
         case "hostAddresses": return java.lang.String.class;
         case "lazystartproducer":
@@ -93,9 +93,9 @@ public class ElasticsearchComponentConfigurer extends PropertyConfigurerSupport
         case "connectiontimeout":
         case "connectionTimeout": return target.getConnectionTimeout();
         case "enablessl":
-        case "enableSSL": return target.getEnableSSL();
+        case "enableSSL": return target.isEnableSSL();
         case "enablesniffer":
-        case "enableSniffer": return target.getEnableSniffer();
+        case "enableSniffer": return target.isEnableSniffer();
         case "hostaddresses":
         case "hostAddresses": return target.getHostAddresses();
         case "lazystartproducer":
diff --git a/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json b/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json
index d424497..aa3ce0f 100644
--- a/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json
+++ b/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json
@@ -22,25 +22,24 @@
     "lenientProperties": false
   },
   "componentProperties": {
+    "connectionTimeout": { "kind": "property", "displayName": "Connection Timeout", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The time in ms to wait before connection will timeout." },
+    "hostAddresses": { "kind": "property", "displayName": "Host Addresses", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead." },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 star [...]
+    "maxRetryTimeout": { "kind": "property", "displayName": "Max Retry Timeout", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The time in ms before retry" },
+    "socketTimeout": { "kind": "property", "displayName": "Socket Timeout", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The timeout in ms to wait before the socket will timeout." },
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "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 t [...]
     "client": { "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.elasticsearch.client.RestClient", "deprecated": false, "autowired": true, "secret": false, "description": "To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings." },
-    "connectionTimeout": { "kind": "property", "displayName": "Connection Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The time in ms to wait before connection will timeout." },
-    "enableSniffer": { "kind": "property", "displayName": "Enable Sniffer", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Enable automatically discover nodes from a running Elasticsearch cluster" },
-    "hostAddresses": { "kind": "property", "displayName": "Host Addresses", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead." },
-    "maxRetryTimeout": { "kind": "property", "displayName": "Max Retry Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The time in ms before retry" },
+    "enableSniffer": { "kind": "property", "displayName": "Enable Sniffer", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable automatically discover nodes from a running Elasticsearch cluster" },
     "sniffAfterFailureDelay": { "kind": "property", "displayName": "Sniff After Failure Delay", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 60000, "description": "The delay of a sniff execution scheduled after a failure (in milliseconds)" },
     "snifferInterval": { "kind": "property", "displayName": "Sniffer Interval", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 300000, "description": "The interval between consecutive ordinary sniff executions in milliseconds. Will be honoured when sniffOnFailure is disabled or when there are no failures between consecutive sniff executions" },
-    "socketTimeout": { "kind": "property", "displayName": "Socket Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The timeout in ms to wait before the socket will timeout." },
-    "enableSSL": { "kind": "property", "displayName": "Enable SSL", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Enable SSL" },
+    "enableSSL": { "kind": "property", "displayName": "Enable SSL", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable SSL" },
     "password": { "kind": "property", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Password for authenticate" },
-    "user": { "kind": "property", "displayName": "User", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Basic authenticate user" }
+    "user": { "kind": "property", "displayName": "User", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Basic authenticate user" }
   },
   "properties": {
     "clusterName": { "kind": "path", "displayName": "Cluster Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Name of the cluster" },
     "connectionTimeout": { "kind": "parameter", "displayName": "Connection Timeout", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "The time in ms to wait before connection will timeout." },
     "disconnect": { "kind": "parameter", "displayName": "Disconnect", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Disconnect after it finish calling the producer" },
-    "enableSniffer": { "kind": "parameter", "displayName": "Enable Sniffer", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Enable automatically discover nodes from a running Elasticsearch cluster" },
     "from": { "kind": "parameter", "displayName": "From", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Starting index of the response." },
     "hostAddresses": { "kind": "parameter", "displayName": "Host Addresses", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Comma separated list with ip:port formatted remote transport addresses to use." },
     "indexName": { "kind": "parameter", "displayName": "Index Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "The name of the index to act against" },
@@ -49,11 +48,12 @@
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.elasticsearch.ElasticsearchOperation", "enum": [ "Index", "Update", "Bulk", "BulkIndex", "GetById", "MultiGet", "MultiSearch", "Delete", "DeleteIndex", "Search", "Exists", "Ping" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.elasticsearch.Elasticse [...]
     "scrollKeepAliveMs": { "kind": "parameter", "displayName": "Scroll Keep Alive Ms", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 60000, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Time in ms during which elasticsearch will keep search context alive" },
     "size": { "kind": "parameter", "displayName": "Size", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Size of the response." },
-    "sniffAfterFailureDelay": { "kind": "parameter", "displayName": "Sniff After Failure Delay", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 60000, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "The delay of a sniff execution scheduled after a failure (in milliseconds)" },
-    "snifferInterval": { "kind": "parameter", "displayName": "Sniffer Interval", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 300000, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "The interval between consecutive ordinary sniff executions in milliseconds. Will be honour [...]
     "socketTimeout": { "kind": "parameter", "displayName": "Socket Timeout", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "The timeout in ms to wait before the socket will timeout." },
     "useScroll": { "kind": "parameter", "displayName": "Use Scroll", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Enable scroll usage" },
     "waitForActiveShards": { "kind": "parameter", "displayName": "Wait For Active Shards", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Index creation waits for the write consistency number of shards to be available" },
+    "enableSniffer": { "kind": "parameter", "displayName": "Enable Sniffer", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Enable automatically discover nodes from a running Elasticsearch cluster" },
+    "sniffAfterFailureDelay": { "kind": "parameter", "displayName": "Sniff After Failure Delay", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 60000, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "The delay of a sniff execution scheduled after a failure (in millis [...]
+    "snifferInterval": { "kind": "parameter", "displayName": "Sniffer Interval", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 300000, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "The interval between consecutive ordinary sniff executions in milliseconds. Will b [...]
     "enableSSL": { "kind": "parameter", "displayName": "Enable SSL", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.elasticsearch.ElasticsearchConfiguration", "configurationField": "configuration", "description": "Enable SSL" }
   }
 }
diff --git a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java
index eb7f1e8..5cc66ce 100644
--- a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java
+++ b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java
@@ -37,22 +37,21 @@ public class ElasticsearchComponent extends DefaultComponent {
 
     @Metadata(label = "advanced", autowired = true)
     private RestClient client;
-    @Metadata(label = "advanced")
+    @Metadata
     private String hostAddresses;
-    @Metadata(label = "advanced", defaultValue = "" + ElasticsearchConstants.DEFAULT_SOCKET_TIMEOUT)
+    @Metadata(defaultValue = "" + ElasticsearchConstants.DEFAULT_SOCKET_TIMEOUT)
     private int socketTimeout = ElasticsearchConstants.DEFAULT_SOCKET_TIMEOUT;
-    @Metadata(label = "advanced", defaultValue = "" + ElasticsearchConstants.MAX_RETRY_TIMEOUT)
+    @Metadata(defaultValue = "" + ElasticsearchConstants.MAX_RETRY_TIMEOUT)
     private int maxRetryTimeout = ElasticsearchConstants.MAX_RETRY_TIMEOUT;
-    @Metadata(label = "advanced", defaultValue = "" + ElasticsearchConstants.DEFAULT_CONNECTION_TIMEOUT)
+    @Metadata(defaultValue = "" + ElasticsearchConstants.DEFAULT_CONNECTION_TIMEOUT)
     private int connectionTimeout = ElasticsearchConstants.DEFAULT_CONNECTION_TIMEOUT;
-
-    @Metadata(label = "security")
+    @Metadata(label = "security", secret = true)
     private String user;
     @Metadata(label = "security", secret = true)
     private String password;
-    @Metadata(label = "security", defaultValue = "false")
+    @Metadata(label = "security")
     private boolean enableSSL;
-    @Metadata(label = "advanced", defaultValue = "false")
+    @Metadata(label = "advanced")
     private boolean enableSniffer;
     @Metadata(label = "advanced", defaultValue = "" + ElasticsearchConstants.DEFAULT_SNIFFER_INTERVAL)
     private int snifferInterval = ElasticsearchConstants.DEFAULT_SNIFFER_INTERVAL;
@@ -76,9 +75,9 @@ public class ElasticsearchComponent extends DefaultComponent {
         config.setMaxRetryTimeout(this.getMaxRetryTimeout());
         config.setConnectionTimeout(this.getConnectionTimeout());
         config.setUser(this.getUser());
-        config.setEnableSSL(this.getEnableSSL());
+        config.setEnableSSL(this.isEnableSSL());
         config.setPassword(this.getPassword());
-        config.setEnableSniffer(this.getEnableSniffer());
+        config.setEnableSniffer(this.isEnableSniffer());
         config.setSnifferInterval(this.getSnifferInterval());
         config.setSniffAfterFailureDelay(this.getSniffAfterFailureDelay());
         config.setClusterName(remaining);
@@ -178,14 +177,14 @@ public class ElasticsearchComponent extends DefaultComponent {
         this.password = password;
     }
 
-    /**
-     * Enable SSL
-     */
-    public Boolean getEnableSSL() {
+    public boolean isEnableSSL() {
         return enableSSL;
     }
 
-    public void setEnableSSL(Boolean enableSSL) {
+    /**
+     * Enable SSL
+     */
+    public void setEnableSSL(boolean enableSSL) {
         this.enableSSL = enableSSL;
     }
 
@@ -200,14 +199,14 @@ public class ElasticsearchComponent extends DefaultComponent {
         this.maxRetryTimeout = maxRetryTimeout;
     }
 
-    /**
-     * Enable automatically discover nodes from a running Elasticsearch cluster
-     */
-    public Boolean getEnableSniffer() {
+    public boolean isEnableSniffer() {
         return enableSniffer;
     }
 
-    public void setEnableSniffer(Boolean enableSniffer) {
+    /**
+     * Enable automatically discover nodes from a running Elasticsearch cluster
+     */
+    public void setEnableSniffer(boolean enableSniffer) {
         this.enableSniffer = enableSniffer;
     }
 
diff --git a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
index f90a1bc..15a3b5f 100644
--- a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
+++ b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
@@ -60,11 +60,11 @@ public class ElasticsearchConfiguration {
     private boolean useScroll;
     @UriParam(defaultValue = "" + ElasticsearchConstants.DEFAULT_SCROLL_KEEP_ALIVE_MS)
     private int scrollKeepAliveMs = ElasticsearchConstants.DEFAULT_SCROLL_KEEP_ALIVE_MS;
-    @UriParam
+    @UriParam(label = "advanced")
     private boolean enableSniffer;
-    @UriParam(defaultValue = "" + ElasticsearchConstants.DEFAULT_SNIFFER_INTERVAL)
+    @UriParam(label = "advanced", defaultValue = "" + ElasticsearchConstants.DEFAULT_SNIFFER_INTERVAL)
     private int snifferInterval = ElasticsearchConstants.DEFAULT_SNIFFER_INTERVAL;
-    @UriParam(defaultValue = "" + ElasticsearchConstants.DEFAULT_AFTER_FAILURE_DELAY)
+    @UriParam(label = "advanced", defaultValue = "" + ElasticsearchConstants.DEFAULT_AFTER_FAILURE_DELAY)
     private int sniffAfterFailureDelay = ElasticsearchConstants.DEFAULT_AFTER_FAILURE_DELAY;
 
     /**
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ElasticsearchRestComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ElasticsearchRestComponentBuilderFactory.java
index 8c32fc5..3393fe6 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ElasticsearchRestComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ElasticsearchRestComponentBuilderFactory.java
@@ -51,6 +51,39 @@ public interface ElasticsearchRestComponentBuilderFactory {
             extends
                 ComponentBuilder<ElasticsearchComponent> {
         /**
+         * The time in ms to wait before connection will timeout.
+         * 
+         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
+         * 
+         * Default: 30000
+         * Group: producer
+         * 
+         * @param connectionTimeout the value to set
+         * @return the dsl builder
+         */
+        default ElasticsearchRestComponentBuilder connectionTimeout(
+                int connectionTimeout) {
+            doSetProperty("connectionTimeout", connectionTimeout);
+            return this;
+        }
+        /**
+         * Comma separated list with ip:port formatted remote transport
+         * addresses to use. The ip and port options must be left blank for
+         * hostAddresses to be considered instead.
+         * 
+         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
+         * 
+         * Group: producer
+         * 
+         * @param hostAddresses the value to set
+         * @return the dsl builder
+         */
+        default ElasticsearchRestComponentBuilder hostAddresses(
+                java.lang.String hostAddresses) {
+            doSetProperty("hostAddresses", hostAddresses);
+            return this;
+        }
+        /**
          * 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
@@ -75,6 +108,38 @@ public interface ElasticsearchRestComponentBuilderFactory {
             return this;
         }
         /**
+         * The time in ms before retry.
+         * 
+         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
+         * 
+         * Default: 30000
+         * Group: producer
+         * 
+         * @param maxRetryTimeout the value to set
+         * @return the dsl builder
+         */
+        default ElasticsearchRestComponentBuilder maxRetryTimeout(
+                int maxRetryTimeout) {
+            doSetProperty("maxRetryTimeout", maxRetryTimeout);
+            return this;
+        }
+        /**
+         * The timeout in ms to wait before the socket will timeout.
+         * 
+         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
+         * 
+         * Default: 30000
+         * Group: producer
+         * 
+         * @param socketTimeout the value to set
+         * @return the dsl builder
+         */
+        default ElasticsearchRestComponentBuilder socketTimeout(
+                int socketTimeout) {
+            doSetProperty("socketTimeout", socketTimeout);
+            return this;
+        }
+        /**
          * 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,
@@ -114,26 +179,10 @@ public interface ElasticsearchRestComponentBuilderFactory {
             return this;
         }
         /**
-         * The time in ms to wait before connection will timeout.
-         * 
-         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
-         * 
-         * Default: 30000
-         * Group: advanced
-         * 
-         * @param connectionTimeout the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchRestComponentBuilder connectionTimeout(
-                int connectionTimeout) {
-            doSetProperty("connectionTimeout", connectionTimeout);
-            return this;
-        }
-        /**
          * Enable automatically discover nodes from a running Elasticsearch
          * cluster.
          * 
-         * The option is a: &lt;code&gt;java.lang.Boolean&lt;/code&gt; type.
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
          * Default: false
          * Group: advanced
@@ -142,44 +191,11 @@ public interface ElasticsearchRestComponentBuilderFactory {
          * @return the dsl builder
          */
         default ElasticsearchRestComponentBuilder enableSniffer(
-                java.lang.Boolean enableSniffer) {
+                boolean enableSniffer) {
             doSetProperty("enableSniffer", enableSniffer);
             return this;
         }
         /**
-         * Comma separated list with ip:port formatted remote transport
-         * addresses to use. The ip and port options must be left blank for
-         * hostAddresses to be considered instead.
-         * 
-         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
-         * 
-         * Group: advanced
-         * 
-         * @param hostAddresses the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchRestComponentBuilder hostAddresses(
-                java.lang.String hostAddresses) {
-            doSetProperty("hostAddresses", hostAddresses);
-            return this;
-        }
-        /**
-         * The time in ms before retry.
-         * 
-         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
-         * 
-         * Default: 30000
-         * Group: advanced
-         * 
-         * @param maxRetryTimeout the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchRestComponentBuilder maxRetryTimeout(
-                int maxRetryTimeout) {
-            doSetProperty("maxRetryTimeout", maxRetryTimeout);
-            return this;
-        }
-        /**
          * The delay of a sniff execution scheduled after a failure (in
          * milliseconds).
          * 
@@ -215,25 +231,9 @@ public interface ElasticsearchRestComponentBuilderFactory {
             return this;
         }
         /**
-         * The timeout in ms to wait before the socket will timeout.
-         * 
-         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
-         * 
-         * Default: 30000
-         * Group: advanced
-         * 
-         * @param socketTimeout the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchRestComponentBuilder socketTimeout(
-                int socketTimeout) {
-            doSetProperty("socketTimeout", socketTimeout);
-            return this;
-        }
-        /**
          * Enable SSL.
          * 
-         * The option is a: &lt;code&gt;java.lang.Boolean&lt;/code&gt; type.
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
          * Default: false
          * Group: security
@@ -241,8 +241,7 @@ public interface ElasticsearchRestComponentBuilderFactory {
          * @param enableSSL the value to set
          * @return the dsl builder
          */
-        default ElasticsearchRestComponentBuilder enableSSL(
-                java.lang.Boolean enableSSL) {
+        default ElasticsearchRestComponentBuilder enableSSL(boolean enableSSL) {
             doSetProperty("enableSSL", enableSSL);
             return this;
         }
@@ -292,17 +291,17 @@ public interface ElasticsearchRestComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "lazyStartProducer": ((ElasticsearchComponent) component).setLazyStartProducer((boolean) value); return true;
-            case "autowiredEnabled": ((ElasticsearchComponent) component).setAutowiredEnabled((boolean) value); return true;
-            case "client": ((ElasticsearchComponent) component).setClient((org.elasticsearch.client.RestClient) value); return true;
             case "connectionTimeout": ((ElasticsearchComponent) component).setConnectionTimeout((int) value); return true;
-            case "enableSniffer": ((ElasticsearchComponent) component).setEnableSniffer((java.lang.Boolean) value); return true;
             case "hostAddresses": ((ElasticsearchComponent) component).setHostAddresses((java.lang.String) value); return true;
+            case "lazyStartProducer": ((ElasticsearchComponent) component).setLazyStartProducer((boolean) value); return true;
             case "maxRetryTimeout": ((ElasticsearchComponent) component).setMaxRetryTimeout((int) value); return true;
+            case "socketTimeout": ((ElasticsearchComponent) component).setSocketTimeout((int) value); return true;
+            case "autowiredEnabled": ((ElasticsearchComponent) component).setAutowiredEnabled((boolean) value); return true;
+            case "client": ((ElasticsearchComponent) component).setClient((org.elasticsearch.client.RestClient) value); return true;
+            case "enableSniffer": ((ElasticsearchComponent) component).setEnableSniffer((boolean) value); return true;
             case "sniffAfterFailureDelay": ((ElasticsearchComponent) component).setSniffAfterFailureDelay((int) value); return true;
             case "snifferInterval": ((ElasticsearchComponent) component).setSnifferInterval((int) value); return true;
-            case "socketTimeout": ((ElasticsearchComponent) component).setSocketTimeout((int) value); return true;
-            case "enableSSL": ((ElasticsearchComponent) component).setEnableSSL((java.lang.Boolean) value); return true;
+            case "enableSSL": ((ElasticsearchComponent) component).setEnableSSL((boolean) value); return true;
             case "password": ((ElasticsearchComponent) component).setPassword((java.lang.String) value); return true;
             case "user": ((ElasticsearchComponent) component).setUser((java.lang.String) value); return true;
             default: return false;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchEndpointBuilderFactory.java
index 0fb1332..8811e69 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchEndpointBuilderFactory.java
@@ -36,6 +36,9 @@ public interface ElasticsearchEndpointBuilderFactory {
     public interface ElasticsearchEndpointBuilder
             extends
                 EndpointProducerBuilder {
+        default AdvancedElasticsearchEndpointBuilder advanced() {
+            return (AdvancedElasticsearchEndpointBuilder) this;
+        }
         /**
          * The time in ms to wait before connection will timeout.
          * 
@@ -100,39 +103,6 @@ public interface ElasticsearchEndpointBuilderFactory {
             return this;
         }
         /**
-         * Enable automatically discover nodes from a running Elasticsearch
-         * cluster.
-         * 
-         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
-         * 
-         * Default: false
-         * Group: producer
-         * 
-         * @param enableSniffer the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchEndpointBuilder enableSniffer(boolean enableSniffer) {
-            doSetProperty("enableSniffer", enableSniffer);
-            return this;
-        }
-        /**
-         * Enable automatically discover nodes from a running Elasticsearch
-         * cluster.
-         * 
-         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
-         * type.
-         * 
-         * Default: false
-         * Group: producer
-         * 
-         * @param enableSniffer the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchEndpointBuilder enableSniffer(String enableSniffer) {
-            doSetProperty("enableSniffer", enableSniffer);
-            return this;
-        }
-        /**
          * Starting index of the response.
          * 
          * The option is a: &lt;code&gt;java.lang.Integer&lt;/code&gt; type.
@@ -363,75 +333,6 @@ public interface ElasticsearchEndpointBuilderFactory {
             return this;
         }
         /**
-         * The delay of a sniff execution scheduled after a failure (in
-         * milliseconds).
-         * 
-         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
-         * 
-         * Default: 60000
-         * Group: producer
-         * 
-         * @param sniffAfterFailureDelay the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchEndpointBuilder sniffAfterFailureDelay(
-                int sniffAfterFailureDelay) {
-            doSetProperty("sniffAfterFailureDelay", sniffAfterFailureDelay);
-            return this;
-        }
-        /**
-         * The delay of a sniff execution scheduled after a failure (in
-         * milliseconds).
-         * 
-         * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
-         * 
-         * Default: 60000
-         * Group: producer
-         * 
-         * @param sniffAfterFailureDelay the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchEndpointBuilder sniffAfterFailureDelay(
-                String sniffAfterFailureDelay) {
-            doSetProperty("sniffAfterFailureDelay", sniffAfterFailureDelay);
-            return this;
-        }
-        /**
-         * The interval between consecutive ordinary sniff executions in
-         * milliseconds. Will be honoured when sniffOnFailure is disabled or
-         * when there are no failures between consecutive sniff executions.
-         * 
-         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
-         * 
-         * Default: 300000
-         * Group: producer
-         * 
-         * @param snifferInterval the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchEndpointBuilder snifferInterval(int snifferInterval) {
-            doSetProperty("snifferInterval", snifferInterval);
-            return this;
-        }
-        /**
-         * The interval between consecutive ordinary sniff executions in
-         * milliseconds. Will be honoured when sniffOnFailure is disabled or
-         * when there are no failures between consecutive sniff executions.
-         * 
-         * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
-         * 
-         * Default: 300000
-         * Group: producer
-         * 
-         * @param snifferInterval the value to set
-         * @return the dsl builder
-         */
-        default ElasticsearchEndpointBuilder snifferInterval(
-                String snifferInterval) {
-            doSetProperty("snifferInterval", snifferInterval);
-            return this;
-        }
-        /**
          * The timeout in ms to wait before the socket will timeout.
          * 
          * The option is a: &lt;code&gt;int&lt;/code&gt; type.
@@ -560,6 +461,122 @@ public interface ElasticsearchEndpointBuilderFactory {
     }
 
     /**
+     * Advanced builder for endpoint for the Elasticsearch Rest component.
+     */
+    public interface AdvancedElasticsearchEndpointBuilder
+            extends
+                EndpointProducerBuilder {
+        default ElasticsearchEndpointBuilder basic() {
+            return (ElasticsearchEndpointBuilder) this;
+        }
+        /**
+         * Enable automatically discover nodes from a running Elasticsearch
+         * cluster.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: advanced
+         * 
+         * @param enableSniffer the value to set
+         * @return the dsl builder
+         */
+        default AdvancedElasticsearchEndpointBuilder enableSniffer(
+                boolean enableSniffer) {
+            doSetProperty("enableSniffer", enableSniffer);
+            return this;
+        }
+        /**
+         * Enable automatically discover nodes from a running Elasticsearch
+         * cluster.
+         * 
+         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: advanced
+         * 
+         * @param enableSniffer the value to set
+         * @return the dsl builder
+         */
+        default AdvancedElasticsearchEndpointBuilder enableSniffer(
+                String enableSniffer) {
+            doSetProperty("enableSniffer", enableSniffer);
+            return this;
+        }
+        /**
+         * The delay of a sniff execution scheduled after a failure (in
+         * milliseconds).
+         * 
+         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
+         * 
+         * Default: 60000
+         * Group: advanced
+         * 
+         * @param sniffAfterFailureDelay the value to set
+         * @return the dsl builder
+         */
+        default AdvancedElasticsearchEndpointBuilder sniffAfterFailureDelay(
+                int sniffAfterFailureDelay) {
+            doSetProperty("sniffAfterFailureDelay", sniffAfterFailureDelay);
+            return this;
+        }
+        /**
+         * The delay of a sniff execution scheduled after a failure (in
+         * milliseconds).
+         * 
+         * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
+         * 
+         * Default: 60000
+         * Group: advanced
+         * 
+         * @param sniffAfterFailureDelay the value to set
+         * @return the dsl builder
+         */
+        default AdvancedElasticsearchEndpointBuilder sniffAfterFailureDelay(
+                String sniffAfterFailureDelay) {
+            doSetProperty("sniffAfterFailureDelay", sniffAfterFailureDelay);
+            return this;
+        }
+        /**
+         * The interval between consecutive ordinary sniff executions in
+         * milliseconds. Will be honoured when sniffOnFailure is disabled or
+         * when there are no failures between consecutive sniff executions.
+         * 
+         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
+         * 
+         * Default: 300000
+         * Group: advanced
+         * 
+         * @param snifferInterval the value to set
+         * @return the dsl builder
+         */
+        default AdvancedElasticsearchEndpointBuilder snifferInterval(
+                int snifferInterval) {
+            doSetProperty("snifferInterval", snifferInterval);
+            return this;
+        }
+        /**
+         * The interval between consecutive ordinary sniff executions in
+         * milliseconds. Will be honoured when sniffOnFailure is disabled or
+         * when there are no failures between consecutive sniff executions.
+         * 
+         * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
+         * 
+         * Default: 300000
+         * Group: advanced
+         * 
+         * @param snifferInterval the value to set
+         * @return the dsl builder
+         */
+        default AdvancedElasticsearchEndpointBuilder snifferInterval(
+                String snifferInterval) {
+            doSetProperty("snifferInterval", snifferInterval);
+            return this;
+        }
+    }
+
+    /**
      * Proxy enum for
      * <code>org.apache.camel.component.elasticsearch.ElasticsearchOperation</code> enum.
      */
@@ -625,7 +642,7 @@ public interface ElasticsearchEndpointBuilderFactory {
     static ElasticsearchEndpointBuilder endpointBuilder(
             String componentName,
             String path) {
-        class ElasticsearchEndpointBuilderImpl extends AbstractEndpointBuilder implements ElasticsearchEndpointBuilder {
+        class ElasticsearchEndpointBuilderImpl extends AbstractEndpointBuilder implements ElasticsearchEndpointBuilder, AdvancedElasticsearchEndpointBuilder {
             public ElasticsearchEndpointBuilderImpl(String path) {
                 super(componentName, path);
             }