Hmm... this is not working the way I expect.�<div><br></div><div>If I do either Holger or Matthias&#39;s solution the write-only &quot;logger&quot; queue continues to grow but the listener queues do stay at 0:</div><div><br>
</div><div><div>~/rabbitmq-server/scripts# ./rabbitmqctl list_queues name mode messages messages_ready messages_unacknowledged durable</div><div>Listing queues ...</div><div>logger_2b02ca30-754b-11de-99c0-0023dfde57d8<span class="Apple-tab-span" style="white-space:pre">        </span>mixed<span class="Apple-tab-span" style="white-space:pre">        </span>0<span class="Apple-tab-span" style="white-space:pre">        </span>0<span class="Apple-tab-span" style="white-space:pre">        </span>0<span class="Apple-tab-span" style="white-space:pre">        </span>false</div>
<div>logger<span class="Apple-tab-span" style="white-space:pre">        </span>mixed<span class="Apple-tab-span" style="white-space:pre">        </span>110<span class="Apple-tab-span" style="white-space:pre">        </span>110<span class="Apple-tab-span" style="white-space:pre">        </span>0<span class="Apple-tab-span" style="white-space:pre">        </span>false</div>
<div><br></div><div>What I would like to see here is that logger is always 0 messages. If there are listeners or not, I don&#39;t want the queue called &quot;logger&quot; to ever retain any messages.�</div><div><br></div>
<div>For both &quot;logger&quot; (write only) and the random queue names (read only) I am doing</div><div><br></div><div><div>�� �ch.exchange_declare(my_exchange, &#39;fanout&#39;, durable=False, auto_delete=False)</div><div>
�� �qname, n_msgs, n_consumers = ch.queue_declare(queue_name, durable=False, exclusive=False, auto_delete=True)</div><div><br></div><div><br></div></div><div><br></div><div><br></div></div><div><br></div><div><br><br><div class="gmail_quote">
On Mon, Jul 20, 2009 at 12:20 PM, Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@lshift.net">matthias@lshift.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Brian, Holger,<br>
<div class="im"><br>
Holger Hoffst�tte wrote:<br>
&gt; Brian Whitman wrote:<br>
&gt;&gt; I am concerned about this because over the weekend the broker crashed<br>
&gt;&gt; (not sure why yet, but I assume it had something to do with probably<br>
&gt;&gt; ~50m messages sitting in the exchange.) How can I have messages be<br>
&gt;&gt; completely transient?<br>
&gt;<br>
&gt; This is done with the &quot;immediate&quot; flag for a message; if there is no<br>
&gt; recipient, the message will be dropped.<br>
<br>
</div>Actually, generally a better solution to the problem is to ensure that<br>
the queues do not outlive the consumers - by either marking them<br>
exclusive (if you only have one consumer per queue) or auto-delete.<br>
<br>
That way messages do really get dropped silently when there are no<br>
consumers. By contrast, when setting &#39;immediate&#39; the server will send a<br>
basic.return to the producer.<br>
<br>
And buffering can still take place to deal with temporarily<br>
backlogged/slow consumers. By contrast, with &#39;immediate&#39; the messages<br>
will get dropped when the consumers are busy (not just when they are not<br>
present).<br>
<br>
<br>
Regards,<br>
<font color="#888888"><br>
Matthias.<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div>