Reputation: 21
We are working on one pub-sub architecture, where we want to use SNS for fan out to multiple SQS Queues. We have a requirement of strict sequence i.e. events should be in sequence for each clients. According to SNS, SQS doc we opted for FIFO topic in SNS and FIFO Queue in SQS which guarantee strict order. I also see their is a retry mechanism by SNS in case of SQS failures (server/network issues)
My question is, with SNS's strong retry (over 100k times in 23 days) , will the strict sequence maintained at SQS side? i.e will the failed messages be delivered first before any new message is delivered? Or will it be delivered in parallel?
I tried replicating SNS retry mechanism using localstack, but for no avail as they have only 3 start support for SQS and SNS(CRUD operation support), not sure if they have same retry implementation
I tried changing SQS policy in aws, but I retry is only triggered on server errors.
So I was not able to test it out.
Upvotes: 2
Views: 80
Reputation: 1
SNS FIFO provides strict ordering on deliveries to a SQS FIFO queue for each message group. Messages not in the same group are delivered in parallel while messages within a group respects the message ordering on delivery.
In case of retries, SNS FIFO will attempt to retry the same message in a group until it succeeds before moving to the next message in the group. If all messages are in the same group, then the first message must be delivered before moving to the next to respect the message ordering.
Upvotes: 0