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...

Resources Required to Process Messages

To help you estimate the resources needed to process your queued messages, Amazon SQS can provide you with an approximate number of messages in a queue. You can view the number of messages that are visible or you can view the number of messages that are not visible. Messages that are not visible are messages in a queue that are not timed-out and not deleted. For more information about visibility, see Visibility Timeout.

[Important]Important

Because of the distributed architecture of SQS, the result is not an exact count of the number of messages in a queue. In most cases it should be close to the actual number of messages in the queue, but you should not rely on the count being precise.

The following table lists the API action to use.

To do this... Use this action With AttributeName set to

Get the approximate number of messages in the queue

GetQueueAttributes

ApproximateNumberOfMessages

Get the approximate number of messages in the queue that are not visible

GetQueueAttributes

ApproximateNumberOfMessagesNotVisible