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 2021/03/03 13:25:23 UTC

[camel-spring-boot] branch master updated: CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-SQS component

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-spring-boot.git


The following commit(s) were added to refs/heads/master by this push:
     new e943775  CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-SQS component
e943775 is described below

commit e943775a7726cc337e019d499ca8a798b16a6fd8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 3 14:25:03 2021 +0100

    CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-SQS component
---
 .../springboot/catalog/components/aws2-sqs.json    |  4 ++++
 .../src/main/docs/aws2-sqs-starter.adoc            |  4 +++-
 .../sqs/springboot/Sqs2ComponentConfiguration.java | 26 ++++++++++++++++++++++
 docs/modules/ROOT/pages/aws2-sqs-starter.adoc      |  4 +++-
 4 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-sqs.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-sqs.json
index c6d148f..393b9ec 100644
--- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-sqs.json
+++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-sqs.json
@@ -26,11 +26,13 @@
     "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" },
     "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" },
+    "overrideEndpoint": { "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpoint [...]
     "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 [...]
     "queueOwnerAWSAccountId": { "kind": "property", "displayName": "Queue Owner AWSAccount Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Specify the queue owner aws account id when you need to connect the queue with different account owner." },
     "region": { "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The region in which SQS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (f [...]
     "trustAllCertificates": { "kind": "property", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+    "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" },
     "useDefaultCredentialsProvider": { "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set whether the SQS client should expect to load credentials on an AWS inf [...]
     "attributeNames": { "kind": "property", "displayName": "Attribute Names", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "A list of attribute names to receive when consuming. Multiple names can be separated by comma." },
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...]
@@ -70,11 +72,13 @@
     "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" },
     "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." },
+    "overrideEndpoint": { "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpoin [...]
     "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 [...]
     "queueOwnerAWSAccountId": { "kind": "parameter", "displayName": "Queue Owner AWSAccount Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Specify the queue owner aws account id when you need to connect the queue with different account owner." },
     "region": { "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The region in which SQS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region ( [...]
     "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+    "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" },
     "useDefaultCredentialsProvider": { "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set whether the SQS client should expect to load credentials on an AWS in [...]
     "attributeNames": { "kind": "parameter", "displayName": "Attribute Names", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "A list of attribute names to receive when consuming. Multiple names can be separated by comma." },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
diff --git a/components-starter/camel-aws2-sqs-starter/src/main/docs/aws2-sqs-starter.adoc b/components-starter/camel-aws2-sqs-starter/src/main/docs/aws2-sqs-starter.adoc
index 509b36f..37cb67e 100644
--- a/components-starter/camel-aws2-sqs-starter/src/main/docs/aws2-sqs-starter.adoc
+++ b/components-starter/camel-aws2-sqs-starter/src/main/docs/aws2-sqs-starter.adoc
@@ -17,7 +17,7 @@ When using aws2-sqs with Spring Boot make sure to use the following Maven depend
 ----
 
 
-The component supports 42 options, which are listed below.
+The component supports 44 options, which are listed below.
 
 
 
@@ -50,6 +50,7 @@ The component supports 42 options, which are listed below.
 | *camel.component.aws2-sqs.message-group-id-strategy* | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. |  | String
 | *camel.component.aws2-sqs.message-retention-period* | The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue. |  | Integer
 | *camel.component.aws2-sqs.operation* | The operation to do in case the user don't want to send only a message |  | Sqs2Operations
+| *camel.component.aws2-sqs.override-endpoint* | Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option | false | Boolean
 | *camel.component.aws2-sqs.policy* | The policy for this queue. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different systems. |  | String
 | *camel.component.aws2-sqs.protocol* | The underlying protocol used to communicate with SQS | https | String
 | *camel.component.aws2-sqs.proxy-host* | To define a proxy host when instantiating the SQS client |  | String
@@ -63,6 +64,7 @@ The component supports 42 options, which are listed below.
 | *camel.component.aws2-sqs.secret-key* | Amazon AWS Secret Key |  | String
 | *camel.component.aws2-sqs.server-side-encryption-enabled* | Define if Server Side Encryption is enabled or not on the queue | false | Boolean
 | *camel.component.aws2-sqs.trust-all-certificates* | If we want to trust all certificates in case of overriding the endpoint | false | Boolean
+| *camel.component.aws2-sqs.uri-endpoint-override* | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
 | *camel.component.aws2-sqs.use-default-credentials-provider* | Set whether the SQS client should expect to load credentials on an AWS infra instance or to expect static credentials to be passed in. | false | Boolean
 | *camel.component.aws2-sqs.visibility-timeout* | The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request to set in the com.amazonaws.services.sqs.model.SetQueueAttributesRequest. This only make sense if its different from defaultVisibilityTimeout. It changes the queue visibility timeout attribute permanently. |  | Integer
 | *camel.component.aws2-sqs.wait-time-seconds* | Duration in seconds (0 to 20) that the ReceiveMessage action call will wait until a message is in the queue to include in the response. |  | Integer
diff --git a/components-starter/camel-aws2-sqs-starter/src/main/java/org/apache/camel/component/aws2/sqs/springboot/Sqs2ComponentConfiguration.java b/components-starter/camel-aws2-sqs-starter/src/main/java/org/apache/camel/component/aws2/sqs/springboot/Sqs2ComponentConfiguration.java
index d0bd56f..deb2070 100644
--- a/components-starter/camel-aws2-sqs-starter/src/main/java/org/apache/camel/component/aws2/sqs/springboot/Sqs2ComponentConfiguration.java
+++ b/components-starter/camel-aws2-sqs-starter/src/main/java/org/apache/camel/component/aws2/sqs/springboot/Sqs2ComponentConfiguration.java
@@ -61,6 +61,11 @@ public class Sqs2ComponentConfiguration
      */
     private Sqs2Configuration configuration;
     /**
+     * Set the need for overidding the endpoint. This option needs to be used in
+     * combination with uriEndpointOverride option
+     */
+    private Boolean overrideEndpoint = false;
+    /**
      * The underlying protocol used to communicate with SQS
      */
     private String protocol = "https";
@@ -84,6 +89,11 @@ public class Sqs2ComponentConfiguration
      */
     private Boolean trustAllCertificates = false;
     /**
+     * Set the overriding uri endpoint. This option needs to be used in
+     * combination with overrideEndpoint option
+     */
+    private String uriEndpointOverride;
+    /**
      * Set whether the SQS client should expect to load credentials on an AWS
      * infra instance or to expect static credentials to be passed in.
      */
@@ -296,6 +306,14 @@ public class Sqs2ComponentConfiguration
         this.configuration = configuration;
     }
 
+    public Boolean getOverrideEndpoint() {
+        return overrideEndpoint;
+    }
+
+    public void setOverrideEndpoint(Boolean overrideEndpoint) {
+        this.overrideEndpoint = overrideEndpoint;
+    }
+
     public String getProtocol() {
         return protocol;
     }
@@ -336,6 +354,14 @@ public class Sqs2ComponentConfiguration
         this.trustAllCertificates = trustAllCertificates;
     }
 
+    public String getUriEndpointOverride() {
+        return uriEndpointOverride;
+    }
+
+    public void setUriEndpointOverride(String uriEndpointOverride) {
+        this.uriEndpointOverride = uriEndpointOverride;
+    }
+
     public Boolean getUseDefaultCredentialsProvider() {
         return useDefaultCredentialsProvider;
     }
diff --git a/docs/modules/ROOT/pages/aws2-sqs-starter.adoc b/docs/modules/ROOT/pages/aws2-sqs-starter.adoc
index 509b36f..37cb67e 100644
--- a/docs/modules/ROOT/pages/aws2-sqs-starter.adoc
+++ b/docs/modules/ROOT/pages/aws2-sqs-starter.adoc
@@ -17,7 +17,7 @@ When using aws2-sqs with Spring Boot make sure to use the following Maven depend
 ----
 
 
-The component supports 42 options, which are listed below.
+The component supports 44 options, which are listed below.
 
 
 
@@ -50,6 +50,7 @@ The component supports 42 options, which are listed below.
 | *camel.component.aws2-sqs.message-group-id-strategy* | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. |  | String
 | *camel.component.aws2-sqs.message-retention-period* | The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue. |  | Integer
 | *camel.component.aws2-sqs.operation* | The operation to do in case the user don't want to send only a message |  | Sqs2Operations
+| *camel.component.aws2-sqs.override-endpoint* | Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option | false | Boolean
 | *camel.component.aws2-sqs.policy* | The policy for this queue. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different systems. |  | String
 | *camel.component.aws2-sqs.protocol* | The underlying protocol used to communicate with SQS | https | String
 | *camel.component.aws2-sqs.proxy-host* | To define a proxy host when instantiating the SQS client |  | String
@@ -63,6 +64,7 @@ The component supports 42 options, which are listed below.
 | *camel.component.aws2-sqs.secret-key* | Amazon AWS Secret Key |  | String
 | *camel.component.aws2-sqs.server-side-encryption-enabled* | Define if Server Side Encryption is enabled or not on the queue | false | Boolean
 | *camel.component.aws2-sqs.trust-all-certificates* | If we want to trust all certificates in case of overriding the endpoint | false | Boolean
+| *camel.component.aws2-sqs.uri-endpoint-override* | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
 | *camel.component.aws2-sqs.use-default-credentials-provider* | Set whether the SQS client should expect to load credentials on an AWS infra instance or to expect static credentials to be passed in. | false | Boolean
 | *camel.component.aws2-sqs.visibility-timeout* | The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request to set in the com.amazonaws.services.sqs.model.SetQueueAttributesRequest. This only make sense if its different from defaultVisibilityTimeout. It changes the queue visibility timeout attribute permanently. |  | Integer
 | *camel.component.aws2-sqs.wait-time-seconds* | Duration in seconds (0 to 20) that the ReceiveMessage action call will wait until a message is in the queue to include in the response. |  | Integer