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 6bb9f5559145bfc1f9db6718192e86c2a09a4e07 Author: Dani Rey <dani.rey...@gmail.com> AuthorDate: Thu May 3 09:26:09 2018 +0200 Fix for findings from code review: - re-added use of configuration.getAmazonAWSHost when building queueUrl - replaced tabs with spaces - use aws-sqs-component.adoc as generated by build --- components/camel-aws/src/main/docs/aws-sqs-component.adoc | 2 +- .../java/org/apache/camel/component/aws/sqs/SqsConfiguration.java | 4 ++-- .../main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/camel-aws/src/main/docs/aws-sqs-component.adoc b/components/camel-aws/src/main/docs/aws-sqs-component.adoc index 72bc438..0550d1d 100644 --- a/components/camel-aws/src/main/docs/aws-sqs-component.adoc +++ b/components/camel-aws/src/main/docs/aws-sqs-component.adoc @@ -78,7 +78,7 @@ with the following path and query parameters: | *amazonSQSClient* (common) | To use the AmazonSQS as client | | AmazonSQS | *headerFilterStrategy* (common) | To use a custom HeaderFilterStrategy to map headers to/from Camel. | | HeaderFilterStrategy | *queueOwnerAWSAccountId* (common) | Specify the queue owner aws account id when you need to connect the queue with different account owner. | | String -| *queueUrl* (common) | To define the queueUrl explicitly. All other parameters which would influence the queueUrl are ignored. | | String +| *queueUrl* (common) | To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. | | String | *region* (common) | Specify the queue region which could be used with queueOwnerAWSAccountId to build the service URL. | | String | *attributeNames* (consumer) | A list of attribute names to receive when consuming. Multiple names can be separated by comma. | | String | *bridgeErrorHandler* (consumer) | 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 message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConfiguration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConfiguration.java index daa098b..481e1a6 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConfiguration.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConfiguration.java @@ -63,7 +63,7 @@ public class SqsConfiguration implements Cloneable { private boolean extendMessageVisibility; @UriParam(label = "consumer", defaultValue = "1") private int concurrentConsumers = 1; - @UriParam + @UriParam private String queueUrl; // producer properties @@ -348,7 +348,7 @@ public class SqsConfiguration implements Cloneable { this.concurrentConsumers = concurrentConsumers; } - /** + /** * To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. */ public String getQueueUrl() { diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java index 91daa2c..7f3ab4d 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java @@ -127,7 +127,9 @@ public class SqsEndpoint extends ScheduledPollEndpoint implements HeaderFilterSt // If both region and Account ID is provided the queue URL can be built manually. // This allows accessing queues where you don't have permission to list queues or query queues if (configuration.getRegion() != null && configuration.getQueueOwnerAWSAccountId() != null) { - queueUrl = "https://sqs." + configuration.getRegion() + ".amazonaws.com/" + String host = configuration.getAmazonAWSHost(); + host = FileUtil.stripTrailingSeparator(host); + queueUrl = "https://sqs." + configuration.getRegion() + host + "/" + configuration.getQueueOwnerAWSAccountId() + "/" + configuration.getQueueName(); } else if (configuration.getQueueOwnerAWSAccountId() != null) { GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest(); @@ -144,7 +146,7 @@ public class SqsEndpoint extends ScheduledPollEndpoint implements HeaderFilterSt LOG.trace("Queue available at '{}'.", queueUrl); break; } - } + } } } -- To stop receiving notification emails like this one, please contact acosent...@apache.org.