You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/07/24 09:14:16 UTC

[camel] 01/03: CAMEL-15310 - AWS* - Support for more than 1 client in the registry - Camel-AWS2-MQ

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

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

commit 79526494aa897c3591e01292a26989d3ddb15725
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Jul 24 11:11:45 2020 +0200

    CAMEL-15310 - AWS* - Support for more than 1 client in the registry - Camel-AWS2-MQ
---
 .../component/aws2/mq/MQ2ComponentConfigurer.java  |  5 ++++
 .../component/aws2/mq/MQ2EndpointConfigurer.java   |  5 ++++
 .../apache/camel/component/aws2/mq/aws2-mq.json    |  2 ++
 .../src/main/docs/aws2-mq-component.adoc           |  6 +++--
 .../camel/component/aws2/mq/MQ2Component.java      |  4 +++-
 .../camel/component/aws2/mq/MQ2Configuration.java  | 15 ++++++++++++
 .../aws2/mq/MQComponentClientRegistryTest.java     | 24 +++++++++++++++++++
 .../dsl/Aws2MqComponentBuilderFactory.java         | 16 +++++++++++++
 .../builder/endpoint/StaticEndpointBuilders.java   |  8 +++----
 .../endpoint/dsl/MQ2EndpointBuilderFactory.java    | 28 ++++++++++++++++++++++
 10 files changed, 106 insertions(+), 7 deletions(-)

diff --git a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java
index 50d6ecf..c7a95c4 100644
--- a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java
+++ b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java
@@ -30,6 +30,8 @@ public class MQ2ComponentConfigurer extends PropertyConfigurerSupport implements
         case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
         case "amazonmqclient":
         case "amazonMqClient": getOrCreateConfiguration(target).setAmazonMqClient(property(camelContext, software.amazon.awssdk.services.mq.MqClient.class, value)); return true;
+        case "autodiscoverclient":
+        case "autoDiscoverClient": getOrCreateConfiguration(target).setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
         case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.mq.MQ2Configuration.class, value)); return true;
@@ -58,6 +60,7 @@ public class MQ2ComponentConfigurer extends PropertyConfigurerSupport implements
         Map<String, Object> answer = new CaseInsensitiveMap();
         answer.put("accessKey", java.lang.String.class);
         answer.put("amazonMqClient", software.amazon.awssdk.services.mq.MqClient.class);
+        answer.put("autoDiscoverClient", boolean.class);
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("configuration", org.apache.camel.component.aws2.mq.MQ2Configuration.class);
         answer.put("lazyStartProducer", boolean.class);
@@ -80,6 +83,8 @@ public class MQ2ComponentConfigurer extends PropertyConfigurerSupport implements
         case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
         case "amazonmqclient":
         case "amazonMqClient": return getOrCreateConfiguration(target).getAmazonMqClient();
+        case "autodiscoverclient":
+        case "autoDiscoverClient": return getOrCreateConfiguration(target).isAutoDiscoverClient();
         case "basicpropertybinding":
         case "basicPropertyBinding": return target.isBasicPropertyBinding();
         case "configuration": return target.getConfiguration();
diff --git a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java
index 8502aae..c1308f3 100644
--- a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java
+++ b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java
@@ -23,6 +23,8 @@ public class MQ2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
         case "amazonmqclient":
         case "amazonMqClient": target.getConfiguration().setAmazonMqClient(property(camelContext, software.amazon.awssdk.services.mq.MqClient.class, value)); return true;
+        case "autodiscoverclient":
+        case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
         case "lazystartproducer":
@@ -51,6 +53,7 @@ public class MQ2EndpointConfigurer extends PropertyConfigurerSupport implements
         Map<String, Object> answer = new CaseInsensitiveMap();
         answer.put("accessKey", java.lang.String.class);
         answer.put("amazonMqClient", software.amazon.awssdk.services.mq.MqClient.class);
+        answer.put("autoDiscoverClient", boolean.class);
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("lazyStartProducer", boolean.class);
         answer.put("operation", org.apache.camel.component.aws2.mq.MQ2Operations.class);
@@ -73,6 +76,8 @@ public class MQ2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "accessKey": return target.getConfiguration().getAccessKey();
         case "amazonmqclient":
         case "amazonMqClient": return target.getConfiguration().getAmazonMqClient();
+        case "autodiscoverclient":
+        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
         case "basicpropertybinding":
         case "basicPropertyBinding": return target.isBasicPropertyBinding();
         case "lazystartproducer":
diff --git a/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json b/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
index 83a1dcf..66f441c 100644
--- a/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
+++ b/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
@@ -22,6 +22,7 @@
   },
   "componentProperties": {
     "amazonMqClient": { "kind": "property", "displayName": "Amazon Mq Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.mq.MqClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
+    "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the r [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "desc [...]
@@ -38,6 +39,7 @@
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Logical name" },
     "amazonMqClient": { "kind": "parameter", "displayName": "Amazon Mq Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.mq.MqClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
+    "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registr [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the  [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "des [...]
     "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
diff --git a/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc b/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
index 7dd3fad..9233089 100644
--- a/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
+++ b/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
@@ -41,7 +41,7 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 MQ component supports 13 options, which are listed below.
+The AWS 2 MQ component supports 14 options, which are listed below.
 
 
 
@@ -49,6 +49,7 @@ The AWS 2 MQ component supports 13 options, which are listed below.
 |===
 | Name | Description | Default | Type
 | *amazonMqClient* (producer) | To use a existing configured AmazonMQClient as client |  | MqClient
+| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | MQ2Configuration
 | *lazyStartProducer* (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 [...]
 | *operation* (producer) | *Required* The operation to perform. It can be listBrokers,createBroker,deleteBroker. The value can be one of: listBrokers, createBroker, deleteBroker, rebootBroker, updateBroker, describeBroker |  | MQ2Operations
@@ -86,13 +87,14 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (13 parameters):
+=== Query Parameters (14 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *amazonMqClient* (producer) | To use a existing configured AmazonMQClient as client |  | MqClient
+| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *lazyStartProducer* (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 [...]
 | *operation* (producer) | *Required* The operation to perform. It can be listBrokers,createBroker,deleteBroker. The value can be one of: listBrokers, createBroker, deleteBroker, rebootBroker, updateBroker, describeBroker |  | MQ2Operations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
diff --git a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java
index b488b4a..512295e 100644
--- a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java
+++ b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java
@@ -55,7 +55,9 @@ public class MQ2Component extends DefaultComponent {
         MQ2Configuration configuration = this.configuration != null ? this.configuration.copy() : new MQ2Configuration();
         MQ2Endpoint endpoint = new MQ2Endpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
-        checkAndSetRegistryClient(configuration, endpoint);
+        if (endpoint.getConfiguration().isAutoDiscoverClient()) {
+            checkAndSetRegistryClient(configuration, endpoint);
+        }
         if (configuration.getAmazonMqClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("amazonMQClient or accessKey and secretKey must be specified");
         }
diff --git a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java
index c990ccf..4d96485 100644
--- a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java
+++ b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java
@@ -51,6 +51,8 @@ public class MQ2Configuration implements Cloneable {
     private boolean pojoRequest;
     @UriParam(defaultValue = "false")
     private boolean trustAllCertificates;
+    @UriParam(label = "common", defaultValue = "true")
+    private boolean autoDiscoverClient = true;
 
     public MqClient getAmazonMqClient() {
         return amazonMqClient;
@@ -164,6 +166,19 @@ public class MQ2Configuration implements Cloneable {
     public void setTrustAllCertificates(boolean trustAllCertificates) {
         this.trustAllCertificates = trustAllCertificates;
     }
+    
+    public boolean isAutoDiscoverClient() {
+        return autoDiscoverClient;
+    }
+
+    /**
+     * Setting the autoDiscoverClient mechanism, if true, the component will
+     * look for a client instance in the registry automatically otherwise it
+     * will skip that checking.
+     */
+    public void setAutoDiscoverClient(boolean autoDiscoverClient) {
+        this.autoDiscoverClient = autoDiscoverClient;
+    }
 
     // *************************************************
     //
diff --git a/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java b/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java
index c9c8e26..3461c6b 100644
--- a/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java
+++ b/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java
@@ -20,6 +20,8 @@ import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class MQComponentClientRegistryTest extends CamelTestSupport {
@@ -43,4 +45,26 @@ public class MQComponentClientRegistryTest extends CamelTestSupport {
             component.createEndpoint("aws2-mq://MyQueue");
         });
     }
+    
+    @Test
+    public void createEndpointWithAutoDiscoverFalse() throws Exception {
+
+        AmazonMQClientMock awsMQClient = new AmazonMQClientMock();
+        context.getRegistry().bind("awsMQClient", awsMQClient);
+        MQ2Component component = context.getComponent("aws2-mq", MQ2Component.class);
+        MQ2Endpoint endpoint = (MQ2Endpoint)component.createEndpoint("aws2-mq://MyQueue?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
+
+        assertNotSame(awsMQClient, endpoint.getConfiguration().getAmazonMqClient());
+    }
+    
+    @Test
+    public void createEndpointWithAutoDiscoverTrue() throws Exception {
+
+        AmazonMQClientMock awsMQClient = new AmazonMQClientMock();
+        context.getRegistry().bind("awsMQClient", awsMQClient);
+        MQ2Component component = context.getComponent("aws2-mq", MQ2Component.class);
+        MQ2Endpoint endpoint = (MQ2Endpoint)component.createEndpoint("aws2-mq://MyQueue?accessKey=xxx&secretKey=yyy");
+
+        assertSame(awsMQClient, endpoint.getConfiguration().getAmazonMqClient());
+    }
 }
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java
index d29fdac..bde30de 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java
@@ -60,6 +60,21 @@ public interface Aws2MqComponentBuilderFactory {
             return this;
         }
         /**
+         * Setting the autoDiscoverClient mechanism, if true, the component will
+         * look for a client instance in the registry automatically otherwise it
+         * will skip that checking.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: common
+         */
+        default Aws2MqComponentBuilder autoDiscoverClient(
+                boolean autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            return this;
+        }
+        /**
          * Component configuration.
          * 
          * The option is a:
@@ -245,6 +260,7 @@ public interface Aws2MqComponentBuilderFactory {
                 Object value) {
             switch (name) {
             case "amazonMqClient": getOrCreateConfiguration((MQ2Component) component).setAmazonMqClient((software.amazon.awssdk.services.mq.MqClient) value); return true;
+            case "autoDiscoverClient": getOrCreateConfiguration((MQ2Component) component).setAutoDiscoverClient((boolean) value); return true;
             case "configuration": ((MQ2Component) component).setConfiguration((org.apache.camel.component.aws2.mq.MQ2Configuration) value); return true;
             case "lazyStartProducer": ((MQ2Component) component).setLazyStartProducer((boolean) value); return true;
             case "operation": getOrCreateConfiguration((MQ2Component) component).setOperation((org.apache.camel.component.aws2.mq.MQ2Operations) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index db1c9cf..665d7fc 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -1334,7 +1334,7 @@ public class StaticEndpointBuilders {
      * 
      * @param path label
      */
-    public static org.apache.camel.builder.endpoint.dsl.MQ2EndpointBuilderFactory.MQ2EndpointBuilder aws2Mq(
+    static org.apache.camel.builder.endpoint.dsl.MQ2EndpointBuilderFactory.MQ2EndpointBuilder aws2Mq(
             String path) {
         return org.apache.camel.builder.endpoint.dsl.MQ2EndpointBuilderFactory.endpointBuilder("aws2-mq", path);
     }
@@ -1355,7 +1355,7 @@ public class StaticEndpointBuilders {
      * instead of the default name
      * @param path label
      */
-    public static org.apache.camel.builder.endpoint.dsl.MQ2EndpointBuilderFactory.MQ2EndpointBuilder aws2Mq(
+    static org.apache.camel.builder.endpoint.dsl.MQ2EndpointBuilderFactory.MQ2EndpointBuilder aws2Mq(
             String componentName,
             String path) {
         return org.apache.camel.builder.endpoint.dsl.MQ2EndpointBuilderFactory.endpointBuilder(componentName, path);
@@ -2078,7 +2078,7 @@ public class StaticEndpointBuilders {
      * 
      * @param path label
      */
-    static org.apache.camel.builder.endpoint.dsl.MQEndpointBuilderFactory.MQEndpointBuilder awsMq(
+    public static org.apache.camel.builder.endpoint.dsl.MQEndpointBuilderFactory.MQEndpointBuilder awsMq(
             String path) {
         return org.apache.camel.builder.endpoint.dsl.MQEndpointBuilderFactory.endpointBuilder("aws-mq", path);
     }
@@ -2099,7 +2099,7 @@ public class StaticEndpointBuilders {
      * instead of the default name
      * @param path label
      */
-    static org.apache.camel.builder.endpoint.dsl.MQEndpointBuilderFactory.MQEndpointBuilder awsMq(
+    public static org.apache.camel.builder.endpoint.dsl.MQEndpointBuilderFactory.MQEndpointBuilder awsMq(
             String componentName,
             String path) {
         return org.apache.camel.builder.endpoint.dsl.MQEndpointBuilderFactory.endpointBuilder(componentName, path);
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java
index 34b8474..0af34c6 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java
@@ -62,6 +62,34 @@ public interface MQ2EndpointBuilderFactory {
             return this;
         }
         /**
+         * Setting the autoDiscoverClient mechanism, if true, the component will
+         * look for a client instance in the registry automatically otherwise it
+         * will skip that checking.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: common
+         */
+        default MQ2EndpointBuilder autoDiscoverClient(boolean autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            return this;
+        }
+        /**
+         * Setting the autoDiscoverClient mechanism, if true, the component will
+         * look for a client instance in the registry automatically otherwise it
+         * will skip that checking.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: common
+         */
+        default MQ2EndpointBuilder autoDiscoverClient(String autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            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