[rabbitmq-discuss] Query a queue status from the client

Christopher Lefevre CLefevre at Transparent.com
Tue Feb 28 16:51:29 GMT 2012


I apologize, in my haste to send this out, I didn't get to fully investigate.

If someone else were to come upon this issue, what you need to do is declare a different Callback method, which accepts a variable.

This variable will contain member items for the Queue, Awaiting Messages, Consumers, Channel Number, and Frame Type.

To access these you would need to use:
variable.frame_type
variable.channel_number
variable.method.queue
variable.method.message_count
variable.method.consumer_count

Sorry to clog up the mailing list, and I hope I'm appending to the message correctly, but hopefully this will clear up any questions people may have had like this.

-Christopher Lefevre

From: Christopher Lefevre
Sent: Tuesday, February 28, 2012 10:54 AM
To: 'rabbitmq-discuss at lists.rabbitmq.com'
Subject: Query a queue status from the client

Hello,
In my searches for obtaining the queue's status from a client, I stumbled upon this Stack Overflow question:
http://stackoverflow.com/questions/1038318/check-rabbitmq-queue-size-from-client

The user is asking about .NET, however I need it to work for Python.

I'm using PIka (0-9-1, if I recall correctly), with RabbitMQ 2.7.1


The user on Stack Overflow seems to be posting the exact solution I need as:

name, jobs, consumers = chan.queue_declare(queue=queuename, passive=True)

However, when I use this line, I only receive back an error that a None type object is not iterable. Which is due to the function only returning None.

Does anyone have any experience with this use case? Am I missing something in the queue declare?


Thank you for your time,
-Christopher Lefevre
The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone (603) 262-6300 or by electronic mail immediately. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120228/0cc5aa63/attachment.htm>


More information about the rabbitmq-discuss mailing list