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/11/18 07:22:13 UTC

[camel] branch master updated (150d33a -> 931c6a5)

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

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


    from 150d33a  Sync Deps
     new 57cf635  CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client
     new 6448866  CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, regen component and configurers
     new 960159d  CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, fixed tests
     new f13e151  CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, regen catalog
     new 931c6a5  CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, added a note to migration guide

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/camel/catalog/components/aws2-sns.json  |  6 ++---
 .../camel/catalog/docs/aws2-sns-component.adoc     | 10 +++-----
 .../aws2/sns/Sns2ComponentConfigurer.java          | 11 ++++----
 .../component/aws2/sns/Sns2EndpointConfigurer.java | 11 ++++----
 .../component/aws2/sns/Sns2EndpointUriFactory.java |  3 +--
 .../apache/camel/component/aws2/sns/aws2-sns.json  |  6 ++---
 .../src/main/docs/aws2-sns-component.adoc          | 10 +++-----
 .../camel/component/aws2/sns/Sns2Component.java    | 21 ----------------
 .../component/aws2/sns/Sns2Configuration.java      | 16 ++----------
 .../aws2/sns/SNSComponentClientRegistryTest.java   | 15 +----------
 .../dsl/Aws2SnsComponentBuilderFactory.java        | 16 ------------
 .../endpoint/dsl/Sns2EndpointBuilderFactory.java   | 29 ----------------------
 .../modules/ROOT/pages/aws2-sns-component.adoc     | 10 +++-----
 .../ROOT/pages/camel-3x-upgrade-guide-3_7.adoc     |  5 ++++
 14 files changed, 35 insertions(+), 134 deletions(-)


[camel] 02/05: CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, regen component and configurers

Posted by ac...@apache.org.
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 64488663ec93239593d7a23b513743b3b81b9fb0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 08:00:15 2020 +0100

    CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, regen component and configurers
---
 .../camel/catalog/docs/aws2-sns-component.adoc     | 10 +++-----
 .../aws2/sns/Sns2ComponentConfigurer.java          | 11 ++++----
 .../component/aws2/sns/Sns2EndpointConfigurer.java | 11 ++++----
 .../component/aws2/sns/Sns2EndpointUriFactory.java |  3 +--
 .../apache/camel/component/aws2/sns/aws2-sns.json  |  6 ++---
 .../src/main/docs/aws2-sns-component.adoc          | 10 +++-----
 .../camel/component/aws2/sns/Sns2Component.java    |  3 ---
 .../dsl/Aws2SnsComponentBuilderFactory.java        | 16 ------------
 .../endpoint/dsl/Sns2EndpointBuilderFactory.java   | 29 ----------------------
 .../modules/ROOT/pages/aws2-sns-component.adoc     | 10 +++-----
 10 files changed, 25 insertions(+), 84 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sns-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sns-component.adoc
index 0949339..cffbd92 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sns-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sns-component.adoc
@@ -45,16 +45,15 @@ The topic will be created if they don't already exists. +
 
 
 // component options: START
-The AWS 2 Simple Notification System (SNS) component supports 21 options, which are listed below.
+The AWS 2 Simple Notification System (SNS) component supports 20 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | SnsClient
+| *amazonSNSClient* (producer) | *Autowired* To use the AmazonSNS as the client |  | SnsClient
 | *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) | Component configuration |  | Sns2Configuration
 | *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 [...]
@@ -99,15 +98,14 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (21 parameters):
+=== Query Parameters (20 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | SnsClient
+| *amazonSNSClient* (producer) | *Autowired* To use the AmazonSNS as the client |  | SnsClient
 | *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-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java b/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java
index a8c7a98..6fa2db7 100644
--- a/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java
+++ b/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java
@@ -34,8 +34,6 @@ public class Sns2ComponentConfigurer extends PropertyConfigurerSupport implement
         case "amazonSNSClient": getOrCreateConfiguration(target).setAmazonSNSClient(property(camelContext, software.amazon.awssdk.services.sns.SnsClient.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 "autowiredenabled":
         case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
         case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.sns.Sns2Configuration.class, value)); return true;
@@ -71,6 +69,11 @@ public class Sns2ComponentConfigurer extends PropertyConfigurerSupport implement
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"amazonSNSClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
@@ -79,8 +82,6 @@ public class Sns2ComponentConfigurer extends PropertyConfigurerSupport implement
         case "amazonSNSClient": return software.amazon.awssdk.services.sns.SnsClient.class;
         case "autocreatetopic":
         case "autoCreateTopic": return boolean.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "autowiredenabled":
         case "autowiredEnabled": return boolean.class;
         case "configuration": return org.apache.camel.component.aws2.sns.Sns2Configuration.class;
@@ -125,8 +126,6 @@ public class Sns2ComponentConfigurer extends PropertyConfigurerSupport implement
         case "amazonSNSClient": return getOrCreateConfiguration(target).getAmazonSNSClient();
         case "autocreatetopic":
         case "autoCreateTopic": return getOrCreateConfiguration(target).isAutoCreateTopic();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return getOrCreateConfiguration(target).isAutoDiscoverClient();
         case "autowiredenabled":
         case "autowiredEnabled": return target.isAutowiredEnabled();
         case "configuration": return target.getConfiguration();
diff --git a/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java b/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java
index 16f1fb6..f6db53f 100644
--- a/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java
+++ b/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java
@@ -27,8 +27,6 @@ public class Sns2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "amazonSNSClient": target.getConfiguration().setAmazonSNSClient(property(camelContext, software.amazon.awssdk.services.sns.SnsClient.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 "headerfilterstrategy":
         case "headerFilterStrategy": target.setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true;
         case "kmsmasterkeyid":
@@ -64,6 +62,11 @@ public class Sns2EndpointConfigurer extends PropertyConfigurerSupport implements
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"amazonSNSClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
@@ -72,8 +75,6 @@ public class Sns2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "amazonSNSClient": return software.amazon.awssdk.services.sns.SnsClient.class;
         case "autocreatetopic":
         case "autoCreateTopic": return boolean.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "headerfilterstrategy":
         case "headerFilterStrategy": return org.apache.camel.spi.HeaderFilterStrategy.class;
         case "kmsmasterkeyid":
@@ -118,8 +119,6 @@ public class Sns2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "amazonSNSClient": return target.getConfiguration().getAmazonSNSClient();
         case "autocreatetopic":
         case "autoCreateTopic": return target.getConfiguration().isAutoCreateTopic();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
         case "headerfilterstrategy":
         case "headerFilterStrategy": return target.getHeaderFilterStrategy();
         case "kmsmasterkeyid":
diff --git a/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java b/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java
index 736e4ab..4ebcb97 100644
--- a/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java
+++ b/components/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java
@@ -20,9 +20,8 @@ public class Sns2EndpointUriFactory extends org.apache.camel.support.component.E
     private static final Set<String> PROPERTY_NAMES;
     private static final Set<String> SECRET_PROPERTY_NAMES;
     static {
-        Set<String> props = new HashSet<>(22);
+        Set<String> props = new HashSet<>(21);
         props.add("useIAMCredentials");
-        props.add("autoDiscoverClient");
         props.add("serverSideEncryptionEnabled");
         props.add("autoCreateTopic");
         props.add("proxyProtocol");
diff --git a/components/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json b/components/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json
index 8a89973..4316ded 100644
--- a/components/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json
+++ b/components/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json
@@ -22,9 +22,8 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "amazonSNSClient": { "kind": "property", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
+    "amazonSNSClient": { "kind": "property", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
     "autoCreateTopic": { "kind": "property", "displayName": "Auto Create Topic", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client inst [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sns.Sns2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
     "kmsMasterKeyId": { "kind": "property", "displayName": "Kms Master Key Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "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 [...]
@@ -46,9 +45,8 @@
   },
   "properties": {
     "topicNameOrArn": { "kind": "path", "displayName": "Topic Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Topic name or ARN" },
-    "amazonSNSClient": { "kind": "parameter", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
+    "amazonSNSClient": { "kind": "parameter", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
     "autoCreateTopic": { "kind": "parameter", "displayName": "Auto Create Topic", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client ins [...]
     "headerFilterStrategy": { "kind": "parameter", "displayName": "Header Filter Strategy", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": 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, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "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 sta [...]
diff --git a/components/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc b/components/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
index 0949339..cffbd92 100644
--- a/components/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
+++ b/components/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
@@ -45,16 +45,15 @@ The topic will be created if they don't already exists. +
 
 
 // component options: START
-The AWS 2 Simple Notification System (SNS) component supports 21 options, which are listed below.
+The AWS 2 Simple Notification System (SNS) component supports 20 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | SnsClient
+| *amazonSNSClient* (producer) | *Autowired* To use the AmazonSNS as the client |  | SnsClient
 | *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) | Component configuration |  | Sns2Configuration
 | *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 [...]
@@ -99,15 +98,14 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (21 parameters):
+=== Query Parameters (20 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | SnsClient
+| *amazonSNSClient* (producer) | *Autowired* To use the AmazonSNS as the client |  | SnsClient
 | *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-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
index 369f68bf..5f3694c 100644
--- a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
+++ b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
@@ -17,7 +17,6 @@
 package org.apache.camel.component.aws2.sns;
 
 import java.util.Map;
-import java.util.Set;
 import java.util.stream.Collectors;
 
 import org.apache.camel.CamelContext;
@@ -25,11 +24,9 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.annotations.Component;
 import org.apache.camel.support.DefaultComponent;
-import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.sns.SnsClient;
 
 @Component("aws2-sns")
 public class Sns2Component extends DefaultComponent {
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SnsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SnsComponentBuilderFactory.java
index fea0ebb..5048a24 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SnsComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SnsComponentBuilderFactory.java
@@ -73,21 +73,6 @@ public interface Aws2SnsComponentBuilderFactory {
             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 Aws2SnsComponentBuilder autoDiscoverClient(
-                boolean autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * Component configuration.
          * 
          * The option is a:
@@ -352,7 +337,6 @@ public interface Aws2SnsComponentBuilderFactory {
             switch (name) {
             case "amazonSNSClient": getOrCreateConfiguration((Sns2Component) component).setAmazonSNSClient((software.amazon.awssdk.services.sns.SnsClient) value); return true;
             case "autoCreateTopic": getOrCreateConfiguration((Sns2Component) component).setAutoCreateTopic((boolean) value); return true;
-            case "autoDiscoverClient": getOrCreateConfiguration((Sns2Component) component).setAutoDiscoverClient((boolean) value); return true;
             case "configuration": ((Sns2Component) component).setConfiguration((org.apache.camel.component.aws2.sns.Sns2Configuration) value); return true;
             case "kmsMasterKeyId": getOrCreateConfiguration((Sns2Component) component).setKmsMasterKeyId((java.lang.String) value); return true;
             case "lazyStartProducer": ((Sns2Component) component).setLazyStartProducer((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sns2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sns2EndpointBuilderFactory.java
index eaef03f..b40ad23 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sns2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sns2EndpointBuilderFactory.java
@@ -88,35 +88,6 @@ public interface Sns2EndpointBuilderFactory {
             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 Sns2EndpointBuilder 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 Sns2EndpointBuilder autoDiscoverClient(String autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * To use a custom HeaderFilterStrategy to map headers to/from Camel.
          * 
          * The option is a:
diff --git a/docs/components/modules/ROOT/pages/aws2-sns-component.adoc b/docs/components/modules/ROOT/pages/aws2-sns-component.adoc
index 26e9da9..e75e7fd 100644
--- a/docs/components/modules/ROOT/pages/aws2-sns-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-sns-component.adoc
@@ -47,16 +47,15 @@ The topic will be created if they don't already exists. +
 
 
 // component options: START
-The AWS 2 Simple Notification System (SNS) component supports 21 options, which are listed below.
+The AWS 2 Simple Notification System (SNS) component supports 20 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | SnsClient
+| *amazonSNSClient* (producer) | *Autowired* To use the AmazonSNS as the client |  | SnsClient
 | *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) | Component configuration |  | Sns2Configuration
 | *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 [...]
@@ -101,15 +100,14 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (21 parameters):
+=== Query Parameters (20 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | SnsClient
+| *amazonSNSClient* (producer) | *Autowired* To use the AmazonSNS as the client |  | SnsClient
 | *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 [...]


[camel] 04/05: CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, regen catalog

Posted by ac...@apache.org.
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 f13e15178a28b04c42c120f5ffef3c14e288c138
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 08:12:33 2020 +0100

    CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, regen catalog
---
 .../resources/org/apache/camel/catalog/components/aws2-sns.json     | 6 ++----
 .../camel/component/aws2/sns/SNSComponentClientRegistryTest.java    | 1 -
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sns.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sns.json
index 8a89973..4316ded 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sns.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sns.json
@@ -22,9 +22,8 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "amazonSNSClient": { "kind": "property", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
+    "amazonSNSClient": { "kind": "property", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
     "autoCreateTopic": { "kind": "property", "displayName": "Auto Create Topic", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client inst [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sns.Sns2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
     "kmsMasterKeyId": { "kind": "property", "displayName": "Kms Master Key Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "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 [...]
@@ -46,9 +45,8 @@
   },
   "properties": {
     "topicNameOrArn": { "kind": "path", "displayName": "Topic Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Topic name or ARN" },
-    "amazonSNSClient": { "kind": "parameter", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
+    "amazonSNSClient": { "kind": "parameter", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sns.SnsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
     "autoCreateTopic": { "kind": "parameter", "displayName": "Auto Create Topic", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client ins [...]
     "headerFilterStrategy": { "kind": "parameter", "displayName": "Header Filter Strategy", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": 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, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", "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, "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 sta [...]
diff --git a/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java b/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java
index 331ee27..1677395 100644
--- a/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java
+++ b/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java
@@ -20,7 +20,6 @@ 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;
 


[camel] 05/05: CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, added a note to migration guide

Posted by ac...@apache.org.
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 931c6a5db2614a5ec3a47efb1c20bd9f4461f035
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 08:15:23 2020 +0100

    CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, added a note to migration guide
---
 docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
index a1768c4..8632cbb 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
@@ -234,4 +234,9 @@ In this context, it wasn't having any sense to maintain the autodiscoverClient o
 The camel-aws2-ses has now support for autowiring the amazonSESClient option with SesClient instance coming from the registry.
 In this context, it wasn't having any sense to maintain the autodiscoverClient option, which has been now removed.
 
+=== Camel-AWS2-SNS Autowire support
+
+The camel-aws2-sns has now support for autowiring the amazonSNSClient option with SnsClient instance coming from the registry.
+In this context, it wasn't having any sense to maintain the autodiscoverClient option, which has been now removed.
+
 


[camel] 01/05: CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client

Posted by ac...@apache.org.
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 57cf6356d72aaa9f9c2cc2deceaf9bded7142b66
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 07:57:56 2020 +0100

    CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client
---
 .../apache/camel/component/aws2/sns/Sns2Component.java | 18 ------------------
 .../camel/component/aws2/sns/Sns2Configuration.java    | 16 ++--------------
 2 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
index 6bf75a9..369f68bf 100644
--- a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
+++ b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
@@ -75,9 +75,6 @@ public class Sns2Component extends DefaultComponent {
             LOG.debug("Created the endpoint with topic {}", configuration.getTopicName());
         }
 
-        if (endpoint.getConfiguration().isAutoDiscoverClient()) {
-            checkAndSetRegistryClient(configuration, endpoint);
-        }
         if (configuration.getAmazonSNSClient() == null
                 && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("AmazonSNSClient or accessKey and secretKey must be specified");
@@ -135,19 +132,4 @@ public class Sns2Component extends DefaultComponent {
         this.configuration = configuration;
     }
 
-    private void checkAndSetRegistryClient(Sns2Configuration configuration, Sns2Endpoint endpoint) {
-        if (ObjectHelper.isEmpty(endpoint.getConfiguration().getAmazonSNSClient())) {
-            LOG.debug("Looking for an SnsClient instance in the registry");
-            Set<SnsClient> clients = getCamelContext().getRegistry().findByType(SnsClient.class);
-            if (clients.size() == 1) {
-                LOG.debug("Found exactly one SnsClient instance in the registry");
-                configuration.setAmazonSNSClient(clients.stream().findFirst().get());
-            } else {
-                LOG.debug("No SnsClient instance in the registry");
-            }
-        } else {
-            LOG.debug("SnsClient instance is already set at endpoint level: skipping the check in the registry");
-        }
-    }
-
 }
diff --git a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java
index b5994e4..3b57d19 100644
--- a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java
+++ b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.aws2.sns;
 
 import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import software.amazon.awssdk.core.Protocol;
@@ -30,6 +31,7 @@ public class Sns2Configuration implements Cloneable {
     // Common properties
     private String topicName;
     @UriParam
+    @Metadata(autowired = true)
     private SnsClient amazonSNSClient;
     @UriParam(label = "security", secret = true)
     private String accessKey;
@@ -63,8 +65,6 @@ public class Sns2Configuration implements Cloneable {
     private String region;
     @UriParam(defaultValue = "false")
     private boolean trustAllCertificates;
-    @UriParam(label = "common", defaultValue = "true")
-    private boolean autoDiscoverClient = true;
     @UriParam(defaultValue = "false")
     private boolean useIAMCredentials;
 
@@ -267,18 +267,6 @@ public class Sns2Configuration implements Cloneable {
         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;
-    }
-
     public boolean isUseIAMCredentials() {
         return useIAMCredentials;
     }


[camel] 03/05: CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, fixed tests

Posted by ac...@apache.org.
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 960159d520306cd1101f4fdc2b1d9cdf5e22d0f9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 08:03:17 2020 +0100

    CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, fixed tests
---
 .../component/aws2/sns/SNSComponentClientRegistryTest.java | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java b/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java
index 5f6ad6b..331ee27 100644
--- a/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java
+++ b/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/SNSComponentClientRegistryTest.java
@@ -47,19 +47,7 @@ public class SNSComponentClientRegistryTest extends CamelTestSupport {
     }
 
     @Test
-    public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
-
-        AmazonSNSClientMock awsSNSClient = new AmazonSNSClientMock();
-        context.getRegistry().bind("awsSNSClient", awsSNSClient);
-        Sns2Component component = context.getComponent("aws2-sns", Sns2Component.class);
-        Sns2Endpoint endpoint = (Sns2Endpoint) component
-                .createEndpoint("aws2-sns://MyTopic?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
-
-        assertNotSame(awsSNSClient, endpoint.getConfiguration().getAmazonSNSClient());
-    }
-
-    @Test
-    public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
+    public void createEndpointWithAutowire() throws Exception {
 
         AmazonSNSClientMock awsSNSClient = new AmazonSNSClientMock();
         context.getRegistry().bind("awsSNSClient", awsSNSClient);