[rabbitmq-discuss] Checking queue size in bytes
weojoew at gmail.com
Mon Jul 8 15:28:29 BST 2013
Is there a way to determine a queue's size in bytes? I'm mostly interested
in size on disk, but the sum of memory and disk would be sufficient if that
happens to be more readily available.
My scenario is as follows:
- We're using RabbitMQ 2.8.7 in a 2-node cluster (and in the process of
upgrading to 3.1.x in a couple months)
- We have several groups of publishers publishing messages of varying sizes
(from 10KB up to 3MB)
- Many messages and queues are configured in the worst-case (no message
ttls, persistent messages, durable and mirrored queues, no queue length
limit), and we're not in a position to change that in the short-term
- From time to time, we have absentee consumers that cause our RabbitMQ
disk usage to climb towards the disk threshold
At the point that disk usage starts to climb, we would like to be able to
mitigate the inevitable disk alarm by identifying the queues containing the
most data and unbind or purge them. If the messages were a uniform size,
we could look at the queue depths and know which queues are consuming the
most disk space, but given the varying message sizes of our scenario, the
queue depth doesn't give us enough information to work with.
Programmatically responding would be great, but manually manipulating the
queues in the management UI would suffice for our immediate needs.
Any recommendations or ideas would be greatly appreciated.
On a related note, would it be possible for some future version of RabbitMQ
to allow queue policies like "x-max-length" and "x-message-ttl" in addition
to the queue declaration arguments?
Thanks a lot,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss