Amazon Simple Queue Service
Developer Guide (API Version 2011-10-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

How SQS Queues Work

This section describes the basic properties of Amazon SQS queues, identifiers for queues and messages, how you determine the general size of the queue, and how you manage the messages in a queue.

A queue can be empty if you haven't sent any messages to it or if you have deleted all the messages from it.

You must assign a name to each of your queues (for more information, see Queue URLs). You can get a list of all your queues or a subset of your queues that share the same initial characters in their names (for example, you could get a list of all your queues whose names start with "T3").

You can delete a queue at any time, whether it is empty or not. Be aware, however, that queues retain messages for a set period of time. By default, a queue retains messages for four days. However, you can configure a queue to retain messages for up to 14 days after the message has been sent.

Amazon SQS can delete your queue without notification if one of the following actions hasn't been performed on it for 30 consecutive days: SendMessage, ReceiveMessage, DeleteMessage, GetQueueAttributes, SetQueueAttributes, AddPermission, and RemovePermission.

[Important]Important

It is a violation of the intended use of Amazon SQS if you repeatedly create queues and then leave them inactive, or if you store excessive amounts of data in your queue.

The following table lists the API actions to use.

To do this... Use this action

Create a queue

CreateQueue

Get the URL of an existing queue

GetQueueUrl

List your queues

ListQueues

Delete a queue

DeleteQueue