SNS not writing to SQS
See original GitHub issueI have 2 docker containers running SNS / SQS using the ElasticMQ example. When I write to the topic it writes correctly out to the log file but doesn’t send message to SQS.
I get the following WARN in the logs
10:04:40.528 [sns-akka.actor.default-dispatcher-3] WARN akka.actor.ActorSystemImpl - Illegal header: Illegal 'authorization' header: Invalid input '/', expected tchar, OWS, listSep or 'EOI' (line 1, column 38): AWS4-HMAC-SHA256 Credential=ACCESSKEY/20180830/us-east-1/sns/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=e732dbb0746280abdbb0b2d3e7c7f7628c2d9926f1dc1a86b1b5f31a4f72a414
^
10:04:40.608 [sns-akka.actor.default-dispatcher-3] WARN o.a.c.component.aws.sqs.SqsProducer - Cannot put the message header key=MessageExchangeId, value=9594974f-d2c7-4d30-bbb8-2ad55991600e into Sqs MessageAttribute
10:04:40.609 [sns-akka.actor.default-dispatcher-3] WARN o.a.c.component.aws.sqs.SqsProducer - Cannot put the message header key=x-amz-sns-message-id, value=9594974f-d2c7-4d30-bbb8-2ad55991600e into Sqs MessageAttribute
Start-up log
10:04:38.285 [sns-akka.actor.default-dispatcher-3] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
10:04:38.461 [sns-akka.actor.default-dispatcher-3] INFO me.snov.sns.Main$ - SNS v0.4.1 is starting
10:04:38.501 [sns-akka.actor.default-dispatcher-3] INFO me.snov.sns.Main$ - Loaded DB
10:04:38.513 [sns-akka.actor.default-dispatcher-5] INFO me.snov.sns.actor.SubscribeActor - Loaded configuration
10:04:39.009 [sns-akka.actor.default-dispatcher-3] INFO o.a.c.i.c.DefaultTypeConverter - Loaded 202 type converters
10:04:39.010 [sns-akka.actor.default-dispatcher-3] INFO o.a.camel.impl.DefaultCamelContext - Apache Camel 0.4.1 (CamelContext: sns) is starting
10:04:39.011 [sns-akka.actor.default-dispatcher-3] INFO o.a.camel.impl.DefaultCamelContext - StreamCaching is enabled on CamelContext: sns
10:04:39.011 [sns-akka.actor.default-dispatcher-3] INFO o.a.c.m.DefaultManagementStrategy - JMX is disabled
10:04:39.026 [sns-akka.actor.default-dispatcher-3] INFO o.a.c.i.DefaultStreamCachingStrategy - StreamCaching in use with spool directory: /tmp/camel/camel-tmp-b35ce329-c557-4e09-8960-c2a80ad3f203 and rules: [Spool > 128K body size]
10:04:39.027 [sns-akka.actor.default-dispatcher-3] INFO o.a.camel.impl.DefaultCamelContext - Total 0 routes, of which 0 are started.
10:04:39.028 [sns-akka.actor.default-dispatcher-3] INFO o.a.camel.impl.DefaultCamelContext - Apache Camel 0.4.1 (CamelContext: sns) started in 0.017 seconds
10:04:39.157 [sns-akka.actor.default-dispatcher-4] INFO o.a.camel.util.CamelContextHelper - No existing PropertiesComponent has been configured, creating a new default PropertiesComponent with name: properties
10:04:40.194 [sns-akka.actor.default-dispatcher-2] WARN akka.actor.ActorSystemImpl - Illegal header: Illegal 'authorization' header: Invalid input '/', expected tchar, OWS, listSep or 'EOI' (line 1, column 49): AWS4-HMAC-SHA256 Credential=AKIAJTVBYXZ67QPY6RNA/20180830/us-east-1/sns/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=6912ca33ab71531efb8958eb907d20c54e28b5ec365480b2b3cde29fd2424d94
^
Conf.json
{
"version": 1,
"timestamp": 1465414804110,
"subscriptions": [
{
"arn": "e9126059-9eab-4b37-8194-e0d64dfb2045",
"topicArn": "arn:aws:sns:us-east-1:123456789012:job-success",
"endpoint": "aws-sqs://job-success?amazonSQSEndpoint={{env:SQS_ENDPOINT}}&accessKey=&secretKey=",
"owner": "",
"protocol": "sqs"
},
{
"arn": "e9126059-9eab-4b37-8194-e0d64dfb2041",
"topicArn": "arn:aws:sns:us-east-1:123456789012:job-error",
"endpoint": "aws-sqs://job-error?amazonSQSEndpoint={{env:SQS_ENDPOINT}}&accessKey=&secretKey=",
"owner": "",
"protocol": "sqs"
},
{
"arn": "6df4ed2b-a650-4f7c-910a-1a89c7cae5a6",
"topicArn": "arn:aws:sns:us-east-1:123456789012:job-success",
"endpoint": "file://tmp?fileName=sns.log",
"owner": "",
"protocol": "file"
}
],
"topics": [
{
"arn": "arn:aws:sns:us-east-1:123456789012:job-success",
"name": "job-success"
},
{
"arn": "arn:aws:sns:us-east-1:123456789012:job-error",
"name": "job-error"
}
]
}
db.json
include classpath("application.conf")
// node-address.host = "*" means the server will take "Host" header of incoming
// requests to generate queue URLs.
node-address {
protocol = http
host = "*"
port = 9324
context-path = ""
}
queues {
job-success {}
job-error {}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
SNS topic not publishing to SQS - Stack Overflow
I have an email subscription on the same topic and the emails arrive fine but the messages never arrive on the queue. I've...
Read more >Get Amazon SQS subscriptions to receive notifications from ...
If your SQS queue's access policy doesn't include the "sqs:SendMessage" action for your SNS topic, then update your policy with the correct ...
Read more >SQS not receiving SNS message - AWS re:Post
I have an SQS Endpoint configure in my SNS Topic. The SQS Endpoint is in "Confirmed" status. The SQS Queue has the correct...
Read more >SNS to SQS subscription not working : r/aws - Reddit
I'm trying to create an SNS to SQS fanout, so I'm subscribing each of my SQS queues to the SNS topic. That part...
Read more >Subscribing an Amazon SQS queue to an Amazon SNS topic
However, you can also subscribe a queue from a different account to your topic. If the user who creates the subscription is not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, did you ever find a solution for this? I’m having the exact same issue
No I don’t think so. I will double check tomorrow