/ops/health says how deep each queue is. That is enough to know something is stuck and not enough
to do anything about it: 4 000 messages waiting on vendor1 reads identically whether it is one
customer’s misfired batch or every account on the box.
queue dump 100 widens everything.
The default is 20 per queue, ceiling 500 — past that the question belongs to cdr_submit rather than
to a live gateway.
The four kinds
retries is the field that answers the question
depth and returned are different questions. depth is the whole queue; returned is how much
was listed. Comparing them is how you tell whether you are seeing the problem or a corner of it.
No message text, and no flag that adds one
cdr_submit excludes the body on principle — destination and source are kept because rating and
disputes need them, the text is not because operating a gateway never does.
A queue dump inherits that rule rather than becoming the one operator surface that hands back customer
traffic in bulk.
body_chars with encoding tells a one-part OTP from a stuck six-part blast, which is the diagnostic
question actually being asked.
Nothing is consumed and nothing is reordered
Each queue is walked with its own iterator while the gateway keeps draining it. So:- A message listed may already be gone by the time you read it.
depthis sampled after the walk and can disagree withentriesby a few.orderedsays whether the list is the order the gateway will send in — false for a priority queue and for the delay queue.
A broker queue is reported but never walked
AMQP has no way to look at a queued message without taking it.basicGet plus a requeue would
reorder the queue and reset delivery counts on paying customers’ messages to satisfy a diagnostic.
So the depth is reported and the dump says so. A broker that is not answering reports the depth as
unknown rather than as zero — which matters, because zero is a claim and unknown is not.
There is deliberately no queue flush
Access
The read token, not the admin one. A dump takes nothing and moves nothing, so a monitoring system holding the watching secret can ask for it.Related
Worker control
Suspend, hold, and what each does to a queue.
Queues and retries
Where the retries in that column come from.