I'm trying to use the AWS SQS FIFO service together with an Elastic Beanstalk worker environment.
Let's say I send a message with MessageDeduplicationId
test
, if I continue sending this exact message in the next 5 minutes, the message will be ignored, correct?
What happens if I send a message with MessageDeduplicationId
test
, the consumer processes the message and deletes it, then, in about 1 minute, I send the exact same message again. Will this message be ignored?
My question is, does deduplication occur as long as the same MessageDeduplicationId
is still in queue/flight? Or is the id banner forever, no other message with the same id can be sent.
Thanks.
PDFRSS. The message deduplication ID is the token used for deduplication of sent messages. 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.
Amazon SNS FIFO topics and Amazon SQS FIFO queues support message deduplication, which provides exactly-once message delivery and processing as long as the following conditions are met: The subscribed SQS FIFO queue exists and has permissions that allow the Amazon SNS service principal to deliver messages to the queue.
FIFO queues provide exactly-once processing, which means that each message is delivered once and remains available until a consumer processes it and deletes it. Duplicates are not introduced into the queue.
If you enabled content-based deduplication for the queue, the message deduplication ID isn't required. For more information, see FIFO delivery logic. (Optional) For a standard queue, you can enter a value for Delivery delay and choose the units. For example, enter 60 and choose seconds.
What happens if I send message with MessageDeduplicationId test , the consumer processes the message and the deletes it, then, in about 1 minute, I send the exact same message again. Will this message be ignored?
Answer seems to be: Yes
Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html
I continue sending this exact messages in the next 5 minutes, the message will be ignored, correct?
Correct. Any longer than 5 minutes, though, and it will be accepted again and delivered again and then ignored for another 5 minutes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With