Amazon Simple Queue Service - Message Deletion

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:

    For the message about the cross is foolishness to those who are perishing, but to us who are being saved it is the power of God.
    Bible: New Testament, 1 Corinthians 1:18.