According to the documentation for SQS (emphasis mine):
Amazon SQS stores copies of your messages on multiple servers for redundancy and high availability. On rare occasions, one of the servers storing a copy of a message might be unavailable when you receive or delete the message. If that occurs, the copy of the message will not be deleted on that unavailable server, and you might get that message copy again when you receive messages. Because of this, you must design your application to be idempotent (i.e., it must not be adversely affected if it processes the same message more than once).
Are these duplicate messages guaranteed to have the same (SQS) message ID?
Yes, they will have the same IDs, so if you are trying to keep track of what has already been processed, keeping a list (in a cache or db) of what you have done 'recently' should work fine.
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