Thanks Gavin for the response. I already got the answer but was not able to post the message.<div>Here is what i did:Similar to what you have suggested.</div><div><br></div><div><div>status = channel.queue_declare(queue=msgqueue)</div>
<div>if status.method.message_count == 0:</div></div><div> print "queue empty"</div><div><br><br><div class="gmail_quote">On Tue, Jul 5, 2011 at 7:34 PM, Gavin M. Roy <span dir="ltr"><<a href="mailto:gmr@myyearbook.com">gmr@myyearbook.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You can do a queue.declare('queue_name', passive=True) and get the results of that which will have the queue depth.<br>
<br>
On Tuesday, July 5, 2011 at 9:05 PM, Vinod Sharma wrote:<br>
<br>
> Hi,<br>
> I am new to rabbitMQ. I am using python pika module to communicate<br>
> with rabbitMQ server.<br>
> is there a function in pika to tell if the message queue is empty or<br>
> not??<br>
><br>
> Thanks,<br>
> Vinod<br>
> _______________________________________________<br>
> rabbitmq-discuss mailing list<br>
> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a> (mailto:<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>)<br>
> <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>--------------------------------<br>Vinod Sharma<br><a href="http://securitygyan.com">http://securitygyan.com</a><br>McAfee Inc<br><br><br>
</div>