简体   繁体   中英

Does AWS SNS have Dead Letter Queue?

SNS can retain messages for each of its consumers for a fixed time period. Eg 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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM