Monitoring queues
See how many messages a queue holds now and over time, in the console, through the API and from an SQS client.
Replace my-queue with the name of your queue. Reading counts needs queue:ListQueues for the
list and queue:GetQueueAttributes for one queue.
Counts now
| Count | Meaning |
|---|---|
| Available | Receivable now |
| In flight | Received, not yet deleted, visibility timeout running |
| Delayed | Sent with a delay still running |
| Dead-lettered | Messages this queue moved to its dead-letter queue that are still there |
The queue list shows Available, In flight and In the DLQ for every queue. A queue's Overview shows all four counts under Messages.
dcloud queue queues get my-queueGET /queue/api/queues/my-queuemessages holds available, inFlight, delayed, deadLettered, total and bytes.
From an SQS client, GetQueueAttributes returns ApproximateNumberOfMessages,
ApproximateNumberOfMessagesNotVisible and ApproximateNumberOfMessagesDelayed.
Counts over time
The available, in-flight and delayed counts are recorded once a minute from when the queue exists.
On the queue's Overview, Messages over time charts them; choose 1 h, 3 h, 24 h or 7 days.
dcloud queue queues metrics my-queue --hours 24GET /queue/api/queues/my-queue/metrics?hours=24hours is 1 to 336 (14 days), 3 by default. The answer has about 180 points per series:
periodSeconds (at least 60) and one series each for messages_available, messages_in_flight
and messages_delayed, each point the highest count in its period.
There are no alarms on queue counts.