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:
“Christina Bailey: I was just thinking how much you can tell about a person from such simple things. Your car, for instance.
Mike Hammer: Now what kind of message does it send you?
Christina: You have only one real, lasting love.
Mike: Now who could that be?
Christina: You. Youre one of those self-indulgent males who thinks about nothing but his clothes, his car, himself. Ill bet you do push-ups every morning just to keep your belly hard.”
—A.I. (Albert Isaac)