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/27 10:00:05 UTC

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

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 01f8777277098f3f13280d41a97c1dd58ca17ffd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 27 11:57:27 2020 +0200

    CAMEL-15310 - AWS* - Support for more than 1 client in the registry - Camel-AWS-SNS
---
 .../component/aws/sns/SnsComponentConfigurer.java  |  5 ++++
 .../component/aws/sns/SnsEndpointConfigurer.java   |  5 ++++
 .../apache/camel/component/aws/sns/aws-sns.json    |  2 ++
 .../src/main/docs/aws-sns-component.adoc           |  6 +++--
 .../camel/component/aws/sns/SnsComponent.java      |  4 +++-
 .../camel/component/aws/sns/SnsConfiguration.java  | 16 +++++++++++++
 .../aws/sns/SNSComponentClientRegistryTest.java    | 24 +++++++++++++++++++
 .../dsl/AwsSnsComponentBuilderFactory.java         | 16 +++++++++++++
 .../endpoint/dsl/SnsEndpointBuilderFactory.java    | 28 ++++++++++++++++++++++
 9 files changed, 103 insertions(+), 3 deletions(-)

diff --git a/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java b/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java
index e7b5e9b..e815c8f 100644
--- a/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java
+++ b/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java
@@ -34,6 +34,8 @@ public class SnsComponentConfigurer extends PropertyConfigurerSupport implements
         case "amazonSQSClient": getOrCreateConfiguration(target).setAmazonSQSClient(property(camelContext, com.amazonaws.services.sqs.AmazonSQS.class, value)); return true;
         case "autocreatetopic":
         case "autoCreateTopic": getOrCreateConfiguration(target).setAutoCreateTopic(property(camelContext, boolean.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.aws.sns.SnsConfiguration.class, value)); return true;
@@ -71,6 +73,7 @@ public class SnsComponentConfigurer extends PropertyConfigurerSupport implements
         answer.put("amazonSNSClient", com.amazonaws.services.sns.AmazonSNS.class);
         answer.put("amazonSQSClient", com.amazonaws.services.sqs.AmazonSQS.class);
         answer.put("autoCreateTopic", boolean.class);
+        answer.put("autoDiscoverClient", boolean.class);
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("configuration", org.apache.camel.component.aws.sns.SnsConfiguration.class);
         answer.put("kmsMasterKeyId", java.lang.String.class);
@@ -101,6 +104,8 @@ public class SnsComponentConfigurer extends PropertyConfigurerSupport implements
         case "amazonSQSClient": return getOrCreateConfiguration(target).getAmazonSQSClient();
         case "autocreatetopic":
         case "autoCreateTopic": return getOrCreateConfiguration(target).isAutoCreateTopic();
+        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-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsEndpointConfigurer.java b/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsEndpointConfigurer.java
index 5e04a50..cd69a1c 100644
--- a/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsEndpointConfigurer.java
+++ b/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsEndpointConfigurer.java
@@ -27,6 +27,8 @@ public class SnsEndpointConfigurer extends PropertyConfigurerSupport implements
         case "amazonSQSClient": target.getConfiguration().setAmazonSQSClient(property(camelContext, com.amazonaws.services.sqs.AmazonSQS.class, value)); return true;
         case "autocreatetopic":
         case "autoCreateTopic": target.getConfiguration().setAutoCreateTopic(property(camelContext, boolean.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 "headerfilterstrategy":
@@ -66,6 +68,7 @@ public class SnsEndpointConfigurer extends PropertyConfigurerSupport implements
         answer.put("amazonSNSClient", com.amazonaws.services.sns.AmazonSNS.class);
         answer.put("amazonSQSClient", com.amazonaws.services.sqs.AmazonSQS.class);
         answer.put("autoCreateTopic", boolean.class);
+        answer.put("autoDiscoverClient", boolean.class);
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("headerFilterStrategy", org.apache.camel.spi.HeaderFilterStrategy.class);
         answer.put("kmsMasterKeyId", java.lang.String.class);
@@ -97,6 +100,8 @@ public class SnsEndpointConfigurer extends PropertyConfigurerSupport implements
         case "amazonSQSClient": return target.getConfiguration().getAmazonSQSClient();
         case "autocreatetopic":
         case "autoCreateTopic": return target.getConfiguration().isAutoCreateTopic();
+        case "autodiscoverclient":
+        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
         case "basicpropertybinding":
         case "basicPropertyBinding": return target.isBasicPropertyBinding();
         case "headerfilterstrategy":
diff --git a/components/camel-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json b/components/camel-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json
index ee5b5ae..8c6e65d 100644
--- a/components/camel-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json
+++ b/components/camel-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json
@@ -24,6 +24,7 @@
     "amazonSNSClient": { "kind": "property", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.sns.AmazonSNS", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
     "amazonSQSClient": { "kind": "property", "displayName": "Amazon SQSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.sqs.AmazonSQS", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "An SQS Client to use as bridge between SNS and SQS" },
     "autoCreateTopic": { "kind": "property", "displayName": "Auto Create Topic", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "Setting the autocreation of the topic" },
+    "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.aws.sns.SnsConfiguration", "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.aws.sns.SnsConfiguration", "deprecated": false, "secret": false, "description": "The component configuration" },
     "kmsMasterKeyId": { "kind": "property", "displayName": "Kms Master Key Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK." },
     "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 [...]
@@ -46,6 +47,7 @@
     "amazonSNSClient": { "kind": "parameter", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.sns.AmazonSNS", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
     "amazonSQSClient": { "kind": "parameter", "displayName": "Amazon SQSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.sqs.AmazonSQS", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "An SQS Client to use as bridge between SNS and SQS" },
     "autoCreateTopic": { "kind": "parameter", "displayName": "Auto Create Topic", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "Setting the autocreation of the topic" },
+    "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.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registr [...]
     "headerFilterStrategy": { "kind": "parameter", "displayName": "Header Filter Strategy", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "secret": false, "description": "To use a custom HeaderFilterStrategy to map headers to\/from Camel." },
     "kmsMasterKeyId": { "kind": "parameter", "displayName": "Kms Master Key Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK." },
     "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  [...]
diff --git a/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc b/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc
index 7c25db2..c2324ec 100644
--- a/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc
+++ b/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc
@@ -39,7 +39,7 @@ The topic will be created if they don't already exists. +
 
 
 // component options: START
-The AWS Simple Notification System (SNS) component supports 19 options, which are listed below.
+The AWS Simple Notification System (SNS) component supports 20 options, which are listed below.
 
 
 
@@ -49,6 +49,7 @@ The AWS Simple Notification System (SNS) component supports 19 options, which ar
 | *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | AmazonSNS
 | *amazonSQSClient* (producer) | An SQS Client to use as bridge between SNS and SQS |  | AmazonSQS
 | *autoCreateTopic* (producer) | Setting the autocreation of the topic | true | boolean
+| *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) | The component configuration |  | SnsConfiguration
 | *kmsMasterKeyId* (producer) | The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. |  | String
 | *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 [...]
@@ -91,7 +92,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (20 parameters):
+=== Query Parameters (21 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -100,6 +101,7 @@ with the following path and query parameters:
 | *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | AmazonSNS
 | *amazonSQSClient* (producer) | An SQS Client to use as bridge between SNS and SQS |  | AmazonSQS
 | *autoCreateTopic* (producer) | Setting the autocreation of the topic | true | boolean
+| *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
 | *headerFilterStrategy* (producer) | To use a custom HeaderFilterStrategy to map headers to/from Camel. |  | HeaderFilterStrategy
 | *kmsMasterKeyId* (producer) | The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. |  | String
 | *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 [...]
diff --git a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java
index 2a34db1..0d47cb1 100644
--- a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java
+++ b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java
@@ -62,7 +62,9 @@ public class SnsComponent extends DefaultComponent {
         }
         SnsEndpoint endpoint = new SnsEndpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
-        checkAndSetRegistryClient(configuration);
+        if (endpoint.getConfiguration().isAutoDiscoverClient()) {
+            checkAndSetRegistryClient(configuration);
+        }
         if (configuration.getAmazonSNSClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("AmazonSNSClient or accessKey and secretKey must be specified");
         }
diff --git a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java
index f5b2334..fcb1739 100644
--- a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java
+++ b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java
@@ -64,6 +64,8 @@ public class SnsConfiguration implements Cloneable {
     private String messageStructure;
     @UriParam
     private String region;
+    @UriParam(label = "common", defaultValue = "true")
+    private boolean autoDiscoverClient = true;
 
     public String getSubject() {
         return subject;
@@ -265,6 +267,20 @@ public class SnsConfiguration implements Cloneable {
     public void setAutoCreateTopic(boolean autoCreateTopic) {
         this.autoCreateTopic = autoCreateTopic;
     }
+    
+    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-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SNSComponentClientRegistryTest.java b/components/camel-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SNSComponentClientRegistryTest.java
index f4675c3..ac98be4 100644
--- a/components/camel-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SNSComponentClientRegistryTest.java
+++ b/components/camel-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SNSComponentClientRegistryTest.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 SNSComponentClientRegistryTest extends CamelTestSupport {
@@ -42,4 +44,26 @@ public class SNSComponentClientRegistryTest extends CamelTestSupport {
         assertThrows(IllegalArgumentException.class,
             () -> component.createEndpoint("aws-sns://MyTopic"));
     }
+    
+    @Test
+    public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
+
+        AmazonSNSClientMock awsSNSClient = new AmazonSNSClientMock();
+        context.getRegistry().bind("awsSNSClient", awsSNSClient);
+        SnsComponent component = context.getComponent("aws-sns", SnsComponent.class);
+        SnsEndpoint endpoint = (SnsEndpoint) component.createEndpoint("aws-sns://MyTopic?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
+
+        assertNotSame(awsSNSClient, endpoint.getConfiguration().getAmazonSNSClient());
+    }
+    
+    @Test
+    public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
+
+        AmazonSNSClientMock awsSNSClient = new AmazonSNSClientMock();
+        context.getRegistry().bind("awsSNSClient", awsSNSClient);
+        SnsComponent component = context.getComponent("aws-sns", SnsComponent.class);
+        SnsEndpoint endpoint = (SnsEndpoint) component.createEndpoint("aws-sns://MyTopic?accessKey=xxx&secretKey=yyy");
+
+        assertSame(awsSNSClient, endpoint.getConfiguration().getAmazonSNSClient());
+    }
 }
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java
index 59cf994..62a97df 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java
@@ -85,6 +85,21 @@ public interface AwsSnsComponentBuilderFactory {
             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 AwsSnsComponentBuilder autoDiscoverClient(
+                boolean autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            return this;
+        }
+        /**
          * The component configuration.
          * 
          * The option is a:
@@ -317,6 +332,7 @@ public interface AwsSnsComponentBuilderFactory {
             case "amazonSNSClient": getOrCreateConfiguration((SnsComponent) component).setAmazonSNSClient((com.amazonaws.services.sns.AmazonSNS) value); return true;
             case "amazonSQSClient": getOrCreateConfiguration((SnsComponent) component).setAmazonSQSClient((com.amazonaws.services.sqs.AmazonSQS) value); return true;
             case "autoCreateTopic": getOrCreateConfiguration((SnsComponent) component).setAutoCreateTopic((boolean) value); return true;
+            case "autoDiscoverClient": getOrCreateConfiguration((SnsComponent) component).setAutoDiscoverClient((boolean) value); return true;
             case "configuration": ((SnsComponent) component).setConfiguration((org.apache.camel.component.aws.sns.SnsConfiguration) value); return true;
             case "kmsMasterKeyId": getOrCreateConfiguration((SnsComponent) component).setKmsMasterKeyId((java.lang.String) value); return true;
             case "lazyStartProducer": ((SnsComponent) component).setLazyStartProducer((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SnsEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SnsEndpointBuilderFactory.java
index e60303a..2ce4619 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SnsEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SnsEndpointBuilderFactory.java
@@ -112,6 +112,34 @@ public interface SnsEndpointBuilderFactory {
             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 SnsEndpointBuilder 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 SnsEndpointBuilder autoDiscoverClient(String autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            return this;
+        }
+        /**
          * To use a custom HeaderFilterStrategy to map headers to/from Camel.
          * 
          * The option is a: