-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscriptions with SQS protocol don't work in accordance with AWS API spec. #23
Comments
@mvmn, check example in tests: https://github.com/s12v/sns/blob/master/features/sqs.feature#L12 |
Thanks. You seem to be using a URL as endpoint though, but, according to AWS documentation, for protocol "sqs" the endpoint should be queue ARN, not a URL. See here: |
@mvmn, yes, I can't use ARN, because it's not a real SNS/SQS... format should match http://camel.apache.org/aws-sqs.html |
Well, if you'd have a URL to elasticMQ configured, all you'd need is queue name I suppose. This is documented also:
|
@mvmn, but I don't have elasticMQ URL anywhere, except the endpoint string |
I mean you could have a configuration property (or, say, a command-line argument) for your app that would contain SQS URL (+possibly also accessKey+secretKey), and then use that to convert ARN into Then one could run elasticMQ on known host:port (say, localhost:9324 - which is the default for elasticMQ), and use your app with it using proper AWS SDK calls. |
@mvmn, could you please provide a complete use-case for this? How do you use this and where is SQS ARN coming from? |
SQS ARN is coming from ElasticMQ. I'm running ElasticMQ and your SNS emulator on my local dev machine, where I develop an app that uses SNS and SQS. Since I don't want to use the real thing during development, I try to replace it with emulators (again, ElasticMQ for SQS, and your emulator for SNS). The app I'm developing creates SQS queue in ElasticMQ (using Amazon Java SDK), then topic in SNS emulator, and then tries to create subscription in SNS emulator for that SQS queue - using valid Amazon API call (done via Java SDK), which requires me to submit topic ARN, protocol, and endpoint parameters. According to API description, for SQS protocol the endpoint parameter must be queue ARN (see aforementioned quotes from Amazon documentation). But you seem to expect a URL that's not even valid in SQS, but is some Camel-specific URL. |
@mvmn, ok, makes sense. I'll try to do it when I have some time. Or maybe you are interested in submitting a PR? That would be awesome. |
Unfortunately, I'm only good with Java, but never did any Scala. And thank you for your time and effort developing this thing. |
FYI - I gave it a shot here: |
When making subscription from SNS to SQS (protocol='sqs', endpoint=queue ARN), the error occurs:
Also it's not clear how one can set SQS endpoint URL - e.g. to localhost when using elasticMQ.
Can you elaborate on elasticMQ integration?
The text was updated successfully, but these errors were encountered: