Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Message IDs on duplicate messages

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?

like image 502
Richard Szalay Avatar asked Jan 24 '15 21:01

Richard Szalay


Video Answer


1 Answers

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.

like image 184
E.J. Brennan Avatar answered Oct 19 '22 21:10

E.J. Brennan