Menu
Amazon Simple Queue Service
Developer Guide

Resources Required to Process Messages

To help you estimate the resources you need to process queued messages, Amazon SQS can determine the approximate number of delayed, visible, and not visible messages in a queue. For more information about visibility, see Visibility Timeout.

Note

For standard queues, the result is approximate because of the distributed architecture of Amazon SQS. In most cases, the count should be close to the actual number of messages in the queue.

For FIFO queues, the result is exact.

The following table lists the API action to use.

To do this...Use this actionUse this AttributeName

Get the approximate number of messages in the queue.

GetQueueAttributes

ApproximateNumberOfMessages

Get the approximate number of messages that are pending to be added to the queue.

GetQueueAttributes

ApproximateNumberofMessagesDelayed

Get the approximate number of messages in the queue that are not visible (messages in flight).

GetQueueAttributes

ApproximateNumberOfMessagesNotVisible