You can also check to see if a queue exists by doing a passive declare. Since your queue is non-durable, if there are no consumers connected to it, it won&#39;t exist.<br><br>To answer Simon&#39;s question, I do this in order to route requests to a specific machine/consumer cluster by declaring a queue with the name of the machine which is consuming. I check to see if the queue exists first, and if it does, I route the message to that queue (where there may be multiple consumers on it), otherwise I send it to a general queue which is durable. Essentially I&#39;m using it to partition tasks based on their hardware/network needs.<br>
<br>Cheers,<br>-Alex<br><br><div class="gmail_quote">On Mon, Jun 11, 2012 at 5:10 AM, Simon MacMullen <span dir="ltr">&lt;<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 10/06/12 21:38, Yurisleidy Hern�ndez Moya wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The Producer can know if there is a Consumer connected to the queue<br>
before sending the message?<br>
</blockquote>
<br></div>
To answer your question literally: yes, use the mgmt HTTP API.<br>
<br>
To answer your question slightly less literally, the point of a messaging system is to let producers and consumers become decoupled - why do you want the producer to know if there is a consumer around?<br>
<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, VMware<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</font></span></blockquote></div><br>