Reputation: 5010
SNS can retain messages for each of its consumers for a fixed time period. E.g. it is 20 minutes for mobile subscribers, and 23 hours for SQS. What happens after that? From what I know, message gets discarded. Why doesn't SNS have a Dead Letter Queue much like SQS and Lambda have, and like other messaging systems? Thanks
Upvotes: 0
Views: 2138
Reputation: 966
Yes, SNS now supports dead-letter queues (DLQ): https://aws.amazon.com/about-aws/whats-new/2019/11/amazon-sns-adds-support-for-dead-letter-queues-dlq/
And here you can understand the SNS message delivery retry policies better: https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html
Upvotes: 3
Reputation: 46879
I can't say 'why' they don't have a DLQ, but you are right, they don't, and undeliverable messages are ultimatley discarded.
Depending on the endpoint there are certain retry policies in place, that imo are pretty good, but ultimately if you are in a pub-sub model, which SNS is, it is upto the 'sub' to be available to receieve messages when they become available.
Upvotes: 1