Amazon Simple Queue Service
Developer Guide (API Version 2012-11-05)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did 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

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