[rabbitmq-discuss] Checking queue size in bytes
Matthias Radestock
matthias at rabbitmq.com
Wed Jul 10 08:36:41 BST 2013
Joe,
On 08/07/13 15:28, Joseph Weeks wrote:
> 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.
In general that is impossible, since messages sent to multiple queues
are only stored on disk once and their payloads are shared in memory.
Then there's the added complication that actual memory use of a message
is difficult to work out at best, and impossible if taking into account
memory fragmentation and gc effects. on-disk size is quite hard to
calculate too.
Having said that, I suppose we could track the "total payload size of
messages in a queue", which would probably suffice for your use case.
I have just filed a feature request for that. It's not a trivial piece
of work though, and we haven't had many requests for this functionality,
so I wouldn't expect to see this in a release soon.
> 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?
Yes. It's on our todo list, but not a priority.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list