Skip to content
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

SNS errors when publishing to a FIFO queue #53

Open
ebmeierj opened this issue Sep 18, 2018 · 1 comment
Open

SNS errors when publishing to a FIFO queue #53

ebmeierj opened this issue Sep 18, 2018 · 1 comment

Comments

@ebmeierj
Copy link

ebmeierj commented Sep 18, 2018

With the following config for sqs

include classpath("application.conf")

node-address {
  host = sqs
}

queues {
  queue1 {
    fifo = true
  }
}

And the following config for sns

{
  "version": 1,
  "timestamp": 1465414804110,
  "subscriptions": [
    {
      "arn": "e9126059-9eab-4b37-8194-e0d64dfb2045",
      "topicArn": "arn:aws:sns:us-east-1:1465414804035:test1",
      "endpoint": "aws-sqs://queue1?amazonSQSEndpoint=http://sqs:9324&accessKey=&secretKey=",
      "owner": "",
      "protocol": "sqs"
    },
  "topics": [
    {
      "arn": "arn:aws:sns:us-east-1:1465414804035:test1",
      "name": "test1"
    }
  ]
}

When I publish a message
AWS_DEFAULT_REGION=us-west-2 AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar aws sns --endpoint-url http://localhost:9911 publish --topic-arn arn:aws:sns:us-west-2:1465414804035:test1 --message 'TEST'

I receive the following errors (which are unhelpful). The exact same configuration with the fifo=true commented out works as expected. I'm not sure which parameter value is the issue as it's not giving me sufficient details

sns_1                       | akka.camel.AkkaCamelException: InvalidParameterValue; see the SQS docs. (Service: AmazonSQS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 00000000-0000-0000-0000-000000000000)
sns_1                       |   at akka.camel.ProducerSupport$$anonfun$produce$1.applyOrElse(Producer.scala:77) ~[sns.jar:0.4.1]
sns_1                       |   at akka.actor.Actor.aroundReceive(Actor.scala:517) ~[sns.jar:0.4.1]
sns_1                       |   at akka.actor.Actor.aroundReceive$(Actor.scala:515) ~[sns.jar:0.4.1]
sns_1                       |   at me.snov.sns.actor.ProducerActor.aroundReceive(ProducerActor.scala:14) ~[sns.jar:0.4.1]
sns_1                       |   at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527) ~[sns.jar:0.4.1]
sns_1                       |   at akka.actor.ActorCell.invoke(ActorCell.scala:496) ~[sns.jar:0.4.1]
sns_1                       |   at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) ~[sns.jar:0.4.1]
sns_1                       |   at akka.dispatch.Mailbox.run(Mailbox.scala:224) ~[sns.jar:0.4.1]
sns_1                       |   at akka.dispatch.Mailbox.exec(Mailbox.scala:234) ~[sns.jar:0.4.1]
sns_1                       |   at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) ~[sns.jar:0.4.1]
sns_1                       |   at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) ~[sns.jar:0.4.1]
sns_1                       |   at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) ~[sns.jar:0.4.1]
sns_1                       |   at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) ~[sns.jar:0.4.1]
sns_1                       | Caused by: com.amazonaws.services.sqs.model.AmazonSQSException: InvalidParameterValue; see the SQS docs. (Service: AmazonSQS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 00000000-0000-0000-0000-000000000000)
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1639) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1304) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1056) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:2013) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:1989) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.services.sqs.AmazonSQSClient.executeSendMessage(AmazonSQSClient.java:1594) ~[sns.jar:0.4.1]
sns_1                       |   at com.amazonaws.services.sqs.AmazonSQSClient.sendMessage(AmazonSQSClient.java:1571) ~[sns.jar:0.4.1]
sns_1                       |   at org.apache.camel.component.aws.sqs.SqsProducer.process(SqsProducer.java:62) ~[sns.jar:0.4.1]
sns_1                       |   at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) ~[sns.jar:0.4.1]
sns_1                       |   at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145) ~[sns.jar:0.4.1]
sns_1                       |   at akka.camel.ProducerSupport$ProducerChild.produce(Producer.scala:141) ~[sns.jar:0.4.1]
sns_1                       |   at akka.camel.ProducerSupport$ProducerChild$$anonfun$receive$1.applyOrElse(Producer.scala:115) ~[sns.jar:0.4.1]
sns_1                       |   at akka.actor.Actor.aroundReceive(Actor.scala:517) ~[sns.jar:0.4.1]
sns_1                       |   at akka.actor.Actor.aroundReceive$(Actor.scala:515) ~[sns.jar:0.4.1]
sns_1                       |   at akka.camel.ProducerSupport$ProducerChild.aroundReceive(Producer.scala:112) ~[sns.jar:0.4.1]
sns_1                       |   ... 9 common frames omitted
@ebmeierj
Copy link
Author

I just found out that AWS currently does NOT support SNS -> FIFO SQS. The error I get in AWS is that a MessageGroupId was not provided. I suspect this is why the above error is happening. Can I get confirmation on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant