[rabbitmq-discuss] Queue Message Count in C#

Emile Joubert emile at rabbitmq.com
Mon Aug 13 14:32:35 BST 2012

Hi Bobin,

On 13/08/12 14:09, Bobin B. Cherian wrote:
> I wanted to be able to see what the queue's message count was, in my
> application itself. I'm working on C#. Right now, the only way I see to
> do this is through the management link, but wanted to incorporate the
> count into my application. Is there anything in the API to do this?

In theory any of the methods that bear a message-count parameter could
be used. Searching the spec page for "message-count" that string will
produce a few results:

Passively declaring the queue and referencing the MessageCount field in
the QueueDeclareOk class is probably the simplest method. If you use
synchronous message retrieval then this information can also be found in


More information about the rabbitmq-discuss mailing list