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 08:58:49 UTC

[camel] branch master updated (931c6a5 -> 6bde1ea)

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 931c6a5  CAMEL-15836 - Camel-AWS2-SNS: enable autowire on the SNS Client, added a note to migration guide
     new 9fc0316  CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client
     new 9ede4c8  CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, regen component and configurers
     new f02042d  CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, fixed tests
     new a2d3cfb  CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, CS
     new 5b71ac0  CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, Regen catalog
     new 6bde1ea  CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, Added a note to migration guide

The 6 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-sqs.json  |  6 +-
 .../camel/catalog/docs/aws2-sqs-component.adoc     | 10 +--
 .../aws2/sqs/Sqs2ComponentConfigurer.java          | 11 ++-
 .../component/aws2/sqs/Sqs2EndpointConfigurer.java | 11 ++-
 .../component/aws2/sqs/Sqs2EndpointUriFactory.java |  3 +-
 .../apache/camel/component/aws2/sqs/aws2-sqs.json  |  6 +-
 .../src/main/docs/aws2-sqs-component.adoc          | 10 +--
 .../camel/component/aws2/sqs/Sqs2Component.java    | 21 -----
 .../component/aws2/sqs/Sqs2Configuration.java      | 16 +---
 .../aws2/sqs/SqsComponentClientRegistryTest.java   | 15 +---
 .../dsl/Aws2SqsComponentBuilderFactory.java        | 16 ----
 .../endpoint/dsl/Sqs2EndpointBuilderFactory.java   | 89 ----------------------
 .../modules/ROOT/pages/aws2-sqs-component.adoc     | 10 +--
 .../ROOT/pages/camel-3x-upgrade-guide-3_7.adoc     |  5 ++
 14 files changed, 35 insertions(+), 194 deletions(-)


[camel] 01/06: CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS 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 9fc0316556eb8d490e0079e747d044a3d35cc2cb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 08:24:42 2020 +0100

    CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client
---
 .../apache/camel/component/aws2/sqs/Sqs2Component.java | 18 ------------------
 .../camel/component/aws2/sqs/Sqs2Configuration.java    | 16 ++--------------
 2 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
index 7be302b..308161c 100644
--- a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
+++ b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
@@ -71,9 +71,6 @@ public class Sqs2Component extends DefaultComponent {
         }
         Sqs2Endpoint sqsEndpoint = new Sqs2Endpoint(uri, this, configuration);
         setProperties(sqsEndpoint, parameters);
-        if (sqsEndpoint.getConfiguration().isAutoDiscoverClient()) {
-            checkAndSetRegistryClient(configuration, sqsEndpoint);
-        }
         if (configuration.getAmazonSQSClient() == null
                 && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("AmazonSQSClient or accessKey and secretKey must be specified.");
@@ -98,19 +95,4 @@ public class Sqs2Component extends DefaultComponent {
     public void setConfiguration(Sqs2Configuration configuration) {
         this.configuration = configuration;
     }
-
-    private void checkAndSetRegistryClient(Sqs2Configuration configuration, Sqs2Endpoint endpoint) {
-        if (ObjectHelper.isEmpty(endpoint.getConfiguration().getAmazonSQSClient())) {
-            LOG.debug("Looking for an SqsClient instance in the registry");
-            Set<SqsClient> clients = getCamelContext().getRegistry().findByType(SqsClient.class);
-            if (clients.size() == 1) {
-                LOG.debug("Found exactly one SqsClient instance in the registry");
-                configuration.setAmazonSQSClient(clients.stream().findFirst().get());
-            } else {
-                LOG.debug("No SqsClient instance in the registry");
-            }
-        } else {
-            LOG.debug("SqsClient instance is already set at endpoint level: skipping the check in the registry");
-        }
-    }
 }
diff --git a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Configuration.java b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Configuration.java
index 3f8b7fa..388f26b 100644
--- a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Configuration.java
+++ b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Configuration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.aws2.sqs;
 
 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;
@@ -28,6 +29,7 @@ public class Sqs2Configuration implements Cloneable {
     // common properties
     private String queueName;
     @UriParam
+    @Metadata(autowired = true)
     private SqsClient amazonSQSClient;
     @UriParam(label = "security", secret = true)
     private String accessKey;
@@ -49,8 +51,6 @@ public class Sqs2Configuration implements Cloneable {
     private boolean autoCreateQueue = true;
     @UriParam(defaultValue = "false")
     private boolean trustAllCertificates;
-    @UriParam(label = "common", defaultValue = "true")
-    private boolean autoDiscoverClient = true;
 
     // consumer properties
     @UriParam(label = "consumer", defaultValue = "true")
@@ -559,18 +559,6 @@ public class Sqs2Configuration 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] 04/06: CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, CS

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 a2d3cfbe32067ac1a7d6420e01a8ca0fcec7e2f9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 09:41:37 2020 +0100

    CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, CS
---
 .../camel/component/aws2/sqs/SqsComponentClientRegistryTest.java       | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
index 01629e3..8f606b6 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.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;
 
@@ -45,7 +44,7 @@ public class SqsComponentClientRegistryTest extends CamelTestSupport {
             Sqs2Endpoint endpoint = (Sqs2Endpoint) component.createEndpoint("aws2-sqs://MyQueue");
         });
     }
-    
+
     @Test
     public void createEndpointWithAutowire() throws Exception {
 


[camel] 02/06: CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS 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 9ede4c82dc324290e8bbb7f5a71aa5a4e63f38af
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 08:31:25 2020 +0100

    CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, regen component and configurers
---
 .../camel/catalog/docs/aws2-sqs-component.adoc     | 10 +--
 .../aws2/sqs/Sqs2ComponentConfigurer.java          | 11 ++-
 .../component/aws2/sqs/Sqs2EndpointConfigurer.java | 11 ++-
 .../component/aws2/sqs/Sqs2EndpointUriFactory.java |  3 +-
 .../apache/camel/component/aws2/sqs/aws2-sqs.json  |  6 +-
 .../src/main/docs/aws2-sqs-component.adoc          | 10 +--
 .../camel/component/aws2/sqs/Sqs2Component.java    |  3 -
 .../dsl/Aws2SqsComponentBuilderFactory.java        | 16 ----
 .../endpoint/dsl/Sqs2EndpointBuilderFactory.java   | 89 ----------------------
 .../modules/ROOT/pages/aws2-sqs-component.adoc     | 10 +--
 10 files changed, 25 insertions(+), 144 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc
index 5e270d6..2365f6e 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc
@@ -43,7 +43,7 @@ The queue will be created if they don't already exists. +
 
 
 // component options: START
-The AWS 2 Simple Queue Service (SQS) component supports 41 options, which are listed below.
+The AWS 2 Simple Queue Service (SQS) component supports 40 options, which are listed below.
 
 
 
@@ -51,9 +51,8 @@ The AWS 2 Simple Queue Service (SQS) component supports 41 options, which are li
 |===
 | Name | Description | Default | Type
 | *amazonAWSHost* (common) | The hostname of the Amazon AWS cloud. | amazonaws.com | String
-| *amazonSQSClient* (common) | To use the AmazonSQS as client |  | SqsClient
+| *amazonSQSClient* (common) | *Autowired* To use the AmazonSQS as client |  | SqsClient
 | *autoCreateQueue* (common) | Setting the autocreation of the queue | 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* (common) | The AWS SQS default configuration |  | Sqs2Configuration
 | *protocol* (common) | The underlying protocol used to communicate with SQS | https | String
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the SQS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
@@ -120,16 +119,15 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (60 parameters):
+=== Query Parameters (59 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *amazonAWSHost* (common) | The hostname of the Amazon AWS cloud. | amazonaws.com | String
-| *amazonSQSClient* (common) | To use the AmazonSQS as client |  | SqsClient
+| *amazonSQSClient* (common) | *Autowired* To use the AmazonSQS as client |  | SqsClient
 | *autoCreateQueue* (common) | Setting the autocreation of the queue | 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* (common) | To use a custom HeaderFilterStrategy to map headers to/from Camel. |  | HeaderFilterStrategy
 | *protocol* (common) | The underlying protocol used to communicate with SQS | https | String
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the SQS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
diff --git a/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java b/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java
index 3755223..fbacf52 100644
--- a/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java
+++ b/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java
@@ -38,8 +38,6 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement
         case "attributeNames": getOrCreateConfiguration(target).setAttributeNames(property(camelContext, java.lang.String.class, value)); return true;
         case "autocreatequeue":
         case "autoCreateQueue": getOrCreateConfiguration(target).setAutoCreateQueue(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 "bridgeerrorhandler":
@@ -110,6 +108,11 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"amazonSQSClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
@@ -122,8 +125,6 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement
         case "attributeNames": return java.lang.String.class;
         case "autocreatequeue":
         case "autoCreateQueue": return boolean.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "autowiredenabled":
         case "autowiredEnabled": return boolean.class;
         case "bridgeerrorhandler":
@@ -207,8 +208,6 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement
         case "attributeNames": return getOrCreateConfiguration(target).getAttributeNames();
         case "autocreatequeue":
         case "autoCreateQueue": return getOrCreateConfiguration(target).isAutoCreateQueue();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return getOrCreateConfiguration(target).isAutoDiscoverClient();
         case "autowiredenabled":
         case "autowiredEnabled": return target.isAutowiredEnabled();
         case "bridgeerrorhandler":
diff --git a/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java b/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java
index 1b58350..af0b274 100644
--- a/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java
+++ b/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java
@@ -31,8 +31,6 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "attributeNames": target.getConfiguration().setAttributeNames(property(camelContext, java.lang.String.class, value)); return true;
         case "autocreatequeue":
         case "autoCreateQueue": target.getConfiguration().setAutoCreateQueue(property(camelContext, boolean.class, value)); return true;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "backofferrorthreshold":
         case "backoffErrorThreshold": target.setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
         case "backoffidlethreshold":
@@ -138,6 +136,11 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"amazonSQSClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
@@ -150,8 +153,6 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "attributeNames": return java.lang.String.class;
         case "autocreatequeue":
         case "autoCreateQueue": return boolean.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "backofferrorthreshold":
         case "backoffErrorThreshold": return int.class;
         case "backoffidlethreshold":
@@ -270,8 +271,6 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "attributeNames": return target.getConfiguration().getAttributeNames();
         case "autocreatequeue":
         case "autoCreateQueue": return target.getConfiguration().isAutoCreateQueue();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
         case "backofferrorthreshold":
         case "backoffErrorThreshold": return target.getBackoffErrorThreshold();
         case "backoffidlethreshold":
diff --git a/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java b/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java
index 5233de8..97be096 100644
--- a/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java
+++ b/components/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java
@@ -20,7 +20,7 @@ public class Sqs2EndpointUriFactory 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<>(61);
+        Set<String> props = new HashSet<>(60);
         props.add("useIAMCredentials");
         props.add("synchronous");
         props.add("queueUrl");
@@ -69,7 +69,6 @@ public class Sqs2EndpointUriFactory extends org.apache.camel.support.component.E
         props.add("policy");
         props.add("timeUnit");
         props.add("delaySeconds");
-        props.add("autoDiscoverClient");
         props.add("messageAttributeNames");
         props.add("serverSideEncryptionEnabled");
         props.add("proxyProtocol");
diff --git a/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json b/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json
index bd4201c..4916c0a 100644
--- a/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json
+++ b/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json
@@ -23,9 +23,8 @@
   },
   "componentProperties": {
     "amazonAWSHost": { "kind": "property", "displayName": "Amazon AWSHost", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "amazonaws.com", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The hostname of the Amazon AWS cloud." },
-    "amazonSQSClient": { "kind": "property", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
+    "amazonSQSClient": { "kind": "property", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
     "autoCreateQueue": { "kind": "property", "displayName": "Auto Create Queue", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the queue" },
-    "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.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client inst [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "The AWS SQS default configuration" },
     "protocol": { "kind": "property", "displayName": "Protocol", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The underlying protocol used to communicate with SQS" },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the [...]
@@ -67,9 +66,8 @@
   "properties": {
     "queueNameOrArn": { "kind": "path", "displayName": "Queue Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Queue name or ARN" },
     "amazonAWSHost": { "kind": "parameter", "displayName": "Amazon AWSHost", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "amazonaws.com", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The hostname of the Amazon AWS cloud." },
-    "amazonSQSClient": { "kind": "parameter", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
+    "amazonSQSClient": { "kind": "parameter", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
     "autoCreateQueue": { "kind": "parameter", "displayName": "Auto Create Queue", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the queue" },
-    "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.sqs.Sqs2Configuration", "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": "common", "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." },
     "protocol": { "kind": "parameter", "displayName": "Protocol", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The underlying protocol used to communicate with SQS" },
     "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating th [...]
diff --git a/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc b/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
index 5e270d6..2365f6e 100644
--- a/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
+++ b/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
@@ -43,7 +43,7 @@ The queue will be created if they don't already exists. +
 
 
 // component options: START
-The AWS 2 Simple Queue Service (SQS) component supports 41 options, which are listed below.
+The AWS 2 Simple Queue Service (SQS) component supports 40 options, which are listed below.
 
 
 
@@ -51,9 +51,8 @@ The AWS 2 Simple Queue Service (SQS) component supports 41 options, which are li
 |===
 | Name | Description | Default | Type
 | *amazonAWSHost* (common) | The hostname of the Amazon AWS cloud. | amazonaws.com | String
-| *amazonSQSClient* (common) | To use the AmazonSQS as client |  | SqsClient
+| *amazonSQSClient* (common) | *Autowired* To use the AmazonSQS as client |  | SqsClient
 | *autoCreateQueue* (common) | Setting the autocreation of the queue | 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* (common) | The AWS SQS default configuration |  | Sqs2Configuration
 | *protocol* (common) | The underlying protocol used to communicate with SQS | https | String
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the SQS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
@@ -120,16 +119,15 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (60 parameters):
+=== Query Parameters (59 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *amazonAWSHost* (common) | The hostname of the Amazon AWS cloud. | amazonaws.com | String
-| *amazonSQSClient* (common) | To use the AmazonSQS as client |  | SqsClient
+| *amazonSQSClient* (common) | *Autowired* To use the AmazonSQS as client |  | SqsClient
 | *autoCreateQueue* (common) | Setting the autocreation of the queue | 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* (common) | To use a custom HeaderFilterStrategy to map headers to/from Camel. |  | HeaderFilterStrategy
 | *protocol* (common) | The underlying protocol used to communicate with SQS | https | String
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the SQS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
diff --git a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
index 308161c..1aee562 100644
--- a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
+++ b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
@@ -17,18 +17,15 @@
 package org.apache.camel.component.aws2.sqs;
 
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.camel.CamelContext;
 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.sqs.SqsClient;
 
 /**
  * For working with Amazon SQS SDK v2.
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SqsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SqsComponentBuilderFactory.java
index 9998ef7..f2b9cfb 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SqsComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2SqsComponentBuilderFactory.java
@@ -87,21 +87,6 @@ public interface Aws2SqsComponentBuilderFactory {
             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 Aws2SqsComponentBuilder autoDiscoverClient(
-                boolean autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * The AWS SQS default configuration.
          * 
          * The option is a:
@@ -640,7 +625,6 @@ public interface Aws2SqsComponentBuilderFactory {
             case "amazonAWSHost": getOrCreateConfiguration((Sqs2Component) component).setAmazonAWSHost((java.lang.String) value); return true;
             case "amazonSQSClient": getOrCreateConfiguration((Sqs2Component) component).setAmazonSQSClient((software.amazon.awssdk.services.sqs.SqsClient) value); return true;
             case "autoCreateQueue": getOrCreateConfiguration((Sqs2Component) component).setAutoCreateQueue((boolean) value); return true;
-            case "autoDiscoverClient": getOrCreateConfiguration((Sqs2Component) component).setAutoDiscoverClient((boolean) value); return true;
             case "configuration": ((Sqs2Component) component).setConfiguration((org.apache.camel.component.aws2.sqs.Sqs2Configuration) value); return true;
             case "protocol": getOrCreateConfiguration((Sqs2Component) component).setProtocol((java.lang.String) value); return true;
             case "proxyProtocol": getOrCreateConfiguration((Sqs2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java
index 38c5cf8..a3e6db6 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java
@@ -114,36 +114,6 @@ public interface Sqs2EndpointBuilderFactory {
             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 Sqs2EndpointConsumerBuilder 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 Sqs2EndpointConsumerBuilder autoDiscoverClient(
-                String autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * To use a custom HeaderFilterStrategy to map headers to/from Camel.
          * 
          * The option is a:
@@ -1475,36 +1445,6 @@ public interface Sqs2EndpointBuilderFactory {
             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 Sqs2EndpointProducerBuilder 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 Sqs2EndpointProducerBuilder autoDiscoverClient(
-                String autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * To use a custom HeaderFilterStrategy to map headers to/from Camel.
          * 
          * The option is a:
@@ -2124,35 +2064,6 @@ public interface Sqs2EndpointBuilderFactory {
             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 Sqs2EndpointBuilder 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 Sqs2EndpointBuilder 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-sqs-component.adoc b/docs/components/modules/ROOT/pages/aws2-sqs-component.adoc
index 13bb48c..597a19e 100644
--- a/docs/components/modules/ROOT/pages/aws2-sqs-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-sqs-component.adoc
@@ -45,7 +45,7 @@ The queue will be created if they don't already exists. +
 
 
 // component options: START
-The AWS 2 Simple Queue Service (SQS) component supports 41 options, which are listed below.
+The AWS 2 Simple Queue Service (SQS) component supports 40 options, which are listed below.
 
 
 
@@ -53,9 +53,8 @@ The AWS 2 Simple Queue Service (SQS) component supports 41 options, which are li
 |===
 | Name | Description | Default | Type
 | *amazonAWSHost* (common) | The hostname of the Amazon AWS cloud. | amazonaws.com | String
-| *amazonSQSClient* (common) | To use the AmazonSQS as client |  | SqsClient
+| *amazonSQSClient* (common) | *Autowired* To use the AmazonSQS as client |  | SqsClient
 | *autoCreateQueue* (common) | Setting the autocreation of the queue | 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* (common) | The AWS SQS default configuration |  | Sqs2Configuration
 | *protocol* (common) | The underlying protocol used to communicate with SQS | https | String
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the SQS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
@@ -122,16 +121,15 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (60 parameters):
+=== Query Parameters (59 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *amazonAWSHost* (common) | The hostname of the Amazon AWS cloud. | amazonaws.com | String
-| *amazonSQSClient* (common) | To use the AmazonSQS as client |  | SqsClient
+| *amazonSQSClient* (common) | *Autowired* To use the AmazonSQS as client |  | SqsClient
 | *autoCreateQueue* (common) | Setting the autocreation of the queue | 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* (common) | To use a custom HeaderFilterStrategy to map headers to/from Camel. |  | HeaderFilterStrategy
 | *protocol* (common) | The underlying protocol used to communicate with SQS | https | String
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the SQS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol


[camel] 06/06: CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS 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 6bde1ea8cb7786e8b3c9cd34f2adc30d49341c90
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 09:48:22 2020 +0100

    CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS 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 8632cbb..3623281 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
@@ -239,4 +239,9 @@ In this context, it wasn't having any sense to maintain the autodiscoverClient o
 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-AWS2-SQS Autowire support
+
+The camel-aws2-sqs has now support for autowiring the amazonSQSClient option with SqsClient 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] 05/06: CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS 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 5b71ac02a6b5ceecda6a6145694fda94395e9f4e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 09:45:30 2020 +0100

    CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, Regen catalog
---
 .../resources/org/apache/camel/catalog/components/aws2-sqs.json     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json
index bd4201c..4916c0a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json
@@ -23,9 +23,8 @@
   },
   "componentProperties": {
     "amazonAWSHost": { "kind": "property", "displayName": "Amazon AWSHost", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "amazonaws.com", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The hostname of the Amazon AWS cloud." },
-    "amazonSQSClient": { "kind": "property", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
+    "amazonSQSClient": { "kind": "property", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
     "autoCreateQueue": { "kind": "property", "displayName": "Auto Create Queue", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the queue" },
-    "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.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client inst [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "The AWS SQS default configuration" },
     "protocol": { "kind": "property", "displayName": "Protocol", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The underlying protocol used to communicate with SQS" },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the [...]
@@ -67,9 +66,8 @@
   "properties": {
     "queueNameOrArn": { "kind": "path", "displayName": "Queue Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Queue name or ARN" },
     "amazonAWSHost": { "kind": "parameter", "displayName": "Amazon AWSHost", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "amazonaws.com", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The hostname of the Amazon AWS cloud." },
-    "amazonSQSClient": { "kind": "parameter", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
+    "amazonSQSClient": { "kind": "parameter", "displayName": "Amazon SQSClient", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sqs.SqsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To use the AmazonSQS as client" },
     "autoCreateQueue": { "kind": "parameter", "displayName": "Auto Create Queue", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the queue" },
-    "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.sqs.Sqs2Configuration", "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": "common", "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." },
     "protocol": { "kind": "parameter", "displayName": "Protocol", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The underlying protocol used to communicate with SQS" },
     "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating th [...]


[camel] 03/06: CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS 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 f02042d6255f0bc5d8ec4499b181bc5ec732958e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 08:32:26 2020 +0100

    CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, fixed tests
---
 .../aws2/sqs/SqsComponentClientRegistryTest.java         | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
index 53c892e..01629e3 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
@@ -45,21 +45,9 @@ public class SqsComponentClientRegistryTest extends CamelTestSupport {
             Sqs2Endpoint endpoint = (Sqs2Endpoint) component.createEndpoint("aws2-sqs://MyQueue");
         });
     }
-
-    @Test
-    public void createEndpointWithAutoDiscoveryClientFalse() throws Exception {
-
-        AmazonSQSClientMock awsSQSClient = new AmazonSQSClientMock();
-        context.getRegistry().bind("awsSQSClient", awsSQSClient);
-        Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class);
-        Sqs2Endpoint endpoint = (Sqs2Endpoint) component
-                .createEndpoint("aws2-sqs://MyQueue?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
-
-        assertNotSame(awsSQSClient, endpoint.getConfiguration().getAmazonSQSClient());
-    }
-
+    
     @Test
-    public void createEndpointWithAutoDiscoveryClientTrue() throws Exception {
+    public void createEndpointWithAutowire() throws Exception {
 
         AmazonSQSClientMock awsSQSClient = new AmazonSQSClientMock();
         context.getRegistry().bind("awsSQSClient", awsSQSClient);