Re: missing region property in aws-sns component

2014-12-16 Thread Willem Jiang
I just went through the code we need to setup the endpoint before creating the 
new topic.
Here is the JIRA[1] I just created.

[1]https://issues.apache.org/jira/browse/CAMEL-8156

--  
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 December 15, 2014 at 3:31:58 PM, Claus Ibsen (claus.ib...@gmail.com) wrote:
 On Sun, Dec 14, 2014 at 11:05 AM, JakubKahovec wrote:
  Hello,
 
  I'm having a similar issue, using Camel-2.14.1-SNAPSHOT and aws-sns.
  TopicArn is being created for the default region us-east instead of eu-west
  although being specified through the amazonSNSEndpoint parameter.
 
  Here is my SNS endpoint:
 
uri=aws-sns://ipex-b2b?amazonSNSEndpoint=https://sns.eu-west-1.amazonaws.comsubject=eventaccessKey=secretKey=/
  
 
  I looked at the Camel-SNS code and I suspect that the problem lies in
  SnsEndpoint.java, method doStart.
  At the moment the SNS client is creating a topic it doesn't have the
  endpoint from configuration set yet (it's being set late, at the end of the
  method) so it creates the topic in the default region rather than in the one
  specified in the endpoint.
 
  
 Ah thanks for spotting this. You are welcome to log a JIRA ticket about this 
 bug
 http://camel.apache.org/support.html
  
 And we love contributions, so you are welcome to work on a fix.
 http://camel.apache.org/contributing.html
  
  
  Jakub
 
 
 
 
 
 
 
  --
  View this message in context: 
  http://camel.465427.n5.nabble.com/missing-region-property-in-aws-sns-component-tp4303687p5760674.html

  Sent from the Camel - Users mailing list archive at Nabble.com.
  
  
  
 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/
  



Re: missing region property in aws-sns component

2014-12-14 Thread JakubKahovec
Hello,

I'm having a similar issue, using Camel-2.14.1-SNAPSHOT and aws-sns.
TopicArn is being created for the default region us-east instead of eu-west
although being specified through the amazonSNSEndpoint parameter.

Here is my SNS endpoint:

to
uri=aws-sns://ipex-b2b?amazonSNSEndpoint=https://sns.eu-west-1.amazonaws.comamp;subject=eventamp;accessKey=amp;secretKey=/
   

I looked at the Camel-SNS code and I suspect that the problem lies in
SnsEndpoint.java, method doStart. 
At the moment the SNS client is creating a topic it doesn't have the
endpoint from configuration set yet (it's being set late, at the end of the
method) so it creates the topic in the default region rather than in the one
specified in the endpoint.  

Jakub
  






--
View this message in context: 
http://camel.465427.n5.nabble.com/missing-region-property-in-aws-sns-component-tp4303687p5760674.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: missing region property in aws-sns component

2014-12-14 Thread Claus Ibsen
On Sun, Dec 14, 2014 at 11:05 AM, JakubKahovec jakub.kaho...@gmail.com wrote:
 Hello,

 I'm having a similar issue, using Camel-2.14.1-SNAPSHOT and aws-sns.
 TopicArn is being created for the default region us-east instead of eu-west
 although being specified through the amazonSNSEndpoint parameter.

 Here is my SNS endpoint:

 to
 uri=aws-sns://ipex-b2b?amazonSNSEndpoint=https://sns.eu-west-1.amazonaws.comamp;subject=eventamp;accessKey=amp;secretKey=/

 I looked at the Camel-SNS code and I suspect that the problem lies in
 SnsEndpoint.java, method doStart.
 At the moment the SNS client is creating a topic it doesn't have the
 endpoint from configuration set yet (it's being set late, at the end of the
 method) so it creates the topic in the default region rather than in the one
 specified in the endpoint.


Ah thanks for spotting this. You are welcome to log a JIRA ticket about this bug
http://camel.apache.org/support.html

And we love contributions, so you are welcome to work on a fix.
http://camel.apache.org/contributing.html


 Jakub







 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/missing-region-property-in-aws-sns-component-tp4303687p5760674.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: missing region property in aws-sns component

2011-04-16 Thread preben
Hi Claus

Created ticket https://issues.apache.org/jira/browse/CAMEL-3874

/preben

--
View this message in context: 
http://camel.465427.n5.nabble.com/missing-region-property-in-aws-sns-component-tp4303687p4307471.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: missing region property in aws-sns component

2011-04-14 Thread Marco Crivellaro
You have to create an AmazonSNSClient and specify the endpoint otherwise it
will default to us-east-1 


AWSCredentials awsCredentials = new BasicAWSCredentials(***, !!!);
AmazonSNSClient client = new AmazonSNSClient(awsCredentials);
client.setEndpoint(http://sns.eu-west-1.amazonaws.com/;);  
((JndiRegistry) ((PropertyPlaceholderDelegateRegistry)
context.getRegistry()).getRegistry()).bind(amazonSNSClient, client);



than you can use the sns client created in the uri:

template.sendBodyAndHeader(aws-sns://MyTopic?amazonSNSClient=#amazonSNSClient,
{\test\:\testvalue\}, Test, Test header);

--
View this message in context: 
http://camel.465427.n5.nabble.com/missing-region-property-in-aws-sns-component-tp4303687p4303872.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: missing region property in aws-sns component

2011-04-14 Thread Richard Kettelerij
This is a useful explanation. I've added it to the Camel website:
https://cwiki.apache.org/confluence/display/CAMEL/AWS-SNS

On Thu, Apr 14, 2011 at 9:47 PM, Marco Crivellaro mcr...@optasportsdata.com
 wrote:

 You have to create an AmazonSNSClient and specify the endpoint otherwise it
 will default to us-east-1


 AWSCredentials awsCredentials = new BasicAWSCredentials(***, !!!);
 AmazonSNSClient client = new AmazonSNSClient(awsCredentials);
 client.setEndpoint(http://sns.eu-west-1.amazonaws.com/;);
 ((JndiRegistry) ((PropertyPlaceholderDelegateRegistry)
 context.getRegistry()).getRegistry()).bind(amazonSNSClient, client);



 than you can use the sns client created in the uri:


 template.sendBodyAndHeader(aws-sns://MyTopic?amazonSNSClient=#amazonSNSClient,
 {\test\:\testvalue\}, Test, Test header);

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/missing-region-property-in-aws-sns-component-tp4303687p4303872.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: missing region property in aws-sns component

2011-04-14 Thread preben
It might be more concise if you could set the awssnsendpoint as an uri option
like the rest of the properties.

eg. add
private String awsSNSEndpoint to SnsConfiguration;

and in SnsEndpoint.createSNSClient do
   
if (configuration.getAwsSNSEndpoint() != null) {
client.setEndpoint(configuration.getAwsSNSEndpoint());
   }
 
This way you would be able to use the full Spring xml using the uri +
options eg:
aws-sns://b2btopic?awsSNSEndpoint=sns.eu-west-1.amazonaws.comamp;accessKey=amp;secretKey=

I have tried it out and it works nice.

/preben



--
View this message in context: 
http://camel.465427.n5.nabble.com/missing-region-property-in-aws-sns-component-tp4303687p4303974.html
Sent from the Camel - Users mailing list archive at Nabble.com.