I have a FIFO queue with multiple consumers. The producer includes a Deduplication ID with every message.
In the docs, it says:
If a message with a particular message deduplication ID is sent successfully, any messages sent with the same message deduplication ID are accepted successfully but aren't delivered during the 5-minute deduplication interval.
It's not clear to me what happens with these messages. Are they deleted? Or do they remain in the queue, and are they picked up after the deduplication period expires?
The reason I want to know is that I'm basing my autoscaling on the number of messages in the queue (visible in-flight). If the messages isn't deleted, I might be adding too many consumers based on that number.
CodePudding user response:
Are they deleted?
Yes, they are accepted by the queue & then deleted by SQS.
The purpose of the deduplication ID is to prevent duplicate messages from being consumed & to guarantee "exactly once" delivery.