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 &quot;queue empty&quot;</div><div><br><br><div class="gmail_quote">On Tue, Jul 5, 2011 at 7:34 PM, Gavin M. Roy <span dir="ltr">&lt;<a href="mailto:gmr@myyearbook.com">gmr@myyearbook.com</a>&gt;</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(&#39;queue_name&#39;, 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>
&gt; Hi,<br>
&gt; I am new to rabbitMQ. I am using python pika module to communicate<br>
&gt; with rabbitMQ server.<br>
&gt; is there a function in pika to tell if the message queue is empty or<br>
&gt; not??<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Vinod<br>
&gt; _______________________________________________<br>
&gt; rabbitmq-discuss mailing list<br>
&gt; <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>
&gt; <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>