Message Deletion
SQS does not automatically delete messages once they are sent. When a message is delivered, a receipt handle is generated for that delivery and sent to the recipient. These receipts are not sent with the message but in addition to it. SQS requires the recipient to provide the receipt in order to delete a message. This feature is new as of 2008 where only the message ID was required for message deletion. Because the system is distributed, a message may be sent more than once. In this case, the most recent receipt handle is needed to delete the message.
Once a message is delivered, it has a visibility timeout to prevent other components from consuming it. The "clock" for the visibility timeout starts once a message is sent, the default time being 30 seconds. If the queue is not told to delete the message during this time, the message becomes visible again and will be resent.
Each queue also consists of a retention parameter defaulting to 4 days. Any message residing in the queue for longer will be purged automatically. The retention can be modified from 1 minute up to 14 days by the user. If the retention is changed while messages are already in the queue, any message that has been in the queue for longer than the new retention will be purged.
Amazon reserves the right to delete an entire queue without notification if it has not been accessed for 30 consecutive days.
Read more about this topic: Amazon Simple Queue Service
Famous quotes containing the word message:
“The message you give your children when you discipline with love is I care too much about you to let you misbehave. I care enough about you that Im willing to spend time and effort to help you learn what is appropriate. All children need the security and stability of food, shelter, love, and protection, but unless they also receive effective and appropriate discipline, they wont feel secure.”
—Stephanie Marston (20th century)