Hi I just checked the code and found camel ignores the “amazonSNSEndpoint” option. So I filled a JIRA[1] and the patch is on the way :)
[1]https://issues.apache.org/jira/browse/CAMEL-7286 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 12, 2014 at 8:08:41 AM, cdfleischmann ([email protected]) wrote: > Hello folks, wondering if you have come across this issue, or if there is > something simple I am doing wrong. > > I am using the SNS Camel component, declared as: > > /* > > > > > > > */ > > And in my routebuilder, I have created the following route like so; > > */Exchange exchange2 = > producer.send("aws-sns://TabcorpTopic?amazonSNSClient=#snsClient", > new Processor() { > public void process(Exchange exchange) throws Exception { > exchange.getIn().setHeader(SnsConstants.SUBJECT, "This is > my subject"); > exchange.getIn().setBody("This is my message text."); > } > }); > > // Simply print out the message id. > System.out.println("Message ID: " + > exchange2.getIn().getHeader(SnsConstants.MESSAGE_ID));/* > > Which works fine, I can subscribe to the topic and receive my notifications, > however, when I try to add the amazonSNSEndpoint=ap-southeast-2 parameter to > change to the Sydney region, it seems to be ignored? > / > *Exchange exchange2 = > producer.send("aws-sns://TabcorpTopic?amazonSNSClient=#snsClient&amazonSNSEndpoint=ap-southeast-2"*/ > > > Instead, I am doing the following to work-around this issue, prior to > calling my producer.send command... > > /*snsClient = (AmazonSNSClient) > exchange.getContext().getRegistry().lookup("snsClient"); > snsClient.setEndpoint("http://sns.ap-southeast-2.amazonaws.com/"); */ > > Out of interest, I have also tried: > > / > *Exchange exchange2 = > producer.send("aws-sns://TabcorpTopic?amazonSNSClient=#snsClient&amazonSNSEndpoint=sns.ap-southeast-2.amazonaws.com"*/ > > > ... to no avail. Is there something I am missing with respect to this > value/parameter? > > Lastly, I believe I am using 2.13-snapshot for my camel pom.xml file. > > Please do let me know... Cheers, > Chris > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/AWS-SNS-Camel-amazonSNSEndpoint-being-ignored-tp5748651.html > > Sent from the Camel - Users mailing list archive at Nabble.com. >
