Updated at 2016-02-22 22:59

Amazon SQS is a message queue as a service. The service is very fault-tolerant and available but distributed nature of it has its quirks.

Message must be deleted after processing it. When you read a message from SQS, it's state becomes "in flight" and cannot be read by other receivers. If message is not deleted by the receiver, message becomes available after specific VisibilityTimeout. You can also extend this timeout by API calls. After a specified retry count, the message is deleted or moved to dead letter queue for debugging.

A message can be delivered multiple times. A single message can be received by multiple queue readers because of the distributed nature of SQS. You should use a database to check if message has already been processed or make the operation idempotent.

Queue messages doesn't maintain their order. Messages might be consumed in a different order they are produced. If you require a strict ordering, use something else than SQS.


  • AWS in Action, Michael Wittig and Andreas Wittig