You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/12/17 05:59:10 UTC
camel git commit: CAMEL-8156 SNSClient should setup endpoint before
creating the topic
Repository: camel
Updated Branches:
refs/heads/master 52b7b9458 -> 20282adce
CAMEL-8156 SNSClient should setup endpoint before creating the topic
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/20282adc
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/20282adc
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/20282adc
Branch: refs/heads/master
Commit: 20282adce89cd7dae22ad14e3700c536cc34642b
Parents: 52b7b94
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Dec 17 12:58:47 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Dec 17 12:58:47 2014 +0800
----------------------------------------------------------------------
.../apache/camel/component/aws/sns/SnsEndpoint.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/20282adc/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
index 031d112..8f51821 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
@@ -72,6 +72,13 @@ public class SnsEndpoint extends DefaultEndpoint {
super.doStart();
snsClient = configuration.getAmazonSNSClient() != null
? configuration.getAmazonSNSClient() : createSNSClient();
+
+ // Override the setting Endpoint from url
+ if (ObjectHelper.isNotEmpty(configuration.getAmazonSNSEndpoint())) {
+ LOG.trace("Updating the SNS region with : {} " + configuration.getAmazonSNSEndpoint());
+ snsClient.setEndpoint(configuration.getAmazonSNSEndpoint());
+ }
+
// creates a new topic, or returns the URL of an existing one
CreateTopicRequest request = new CreateTopicRequest(configuration.getTopicName());
@@ -89,11 +96,7 @@ public class SnsEndpoint extends DefaultEndpoint {
LOG.trace("Topic policy updated");
}
- // Override the setting Endpoint from url
- if (ObjectHelper.isNotEmpty(configuration.getAmazonSNSEndpoint())) {
- LOG.trace("Updating the SNS region with : {} " + configuration.getAmazonSNSEndpoint());
- snsClient.setEndpoint(configuration.getAmazonSNSEndpoint());
- }
+
}
public SnsConfiguration getConfiguration() {