SQS Visibility Timeout Expiry Can Cause Duplicate Message Processing
A duplicate job can run twice when an Amazon SQS message becomes visible again before the first worker finishes and deletes it. The most common cause is a visibility timeout shorter than the actual processing time, not a fault in SQS itself. The queue default is 30 seconds, and it can be set anywhere from 0 to 43,200 seconds, with AWS advising a value that matches the typical maximum processing time. For individual messages that need more time, the ChangeMessageVisibility action can extend the timeout, but the total visibility period cannot exceed 12 hours from first receipt. Changes made through ChangeMessageVisibility also do not persist as the new default if the message is received again.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in