Hmm... this is not working the way I expect. <div><br></div><div>If I do either Holger or Matthias's solution the write-only "logger" 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't want the queue called "logger" to ever retain any messages. </div><div><br></div>
<div>For both "logger" (write only) and the random queue names (read only) I am doing</div><div><br></div><div><div> ch.exchange_declare(my_exchange, 'fanout', 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"><<a href="mailto:matthias@lshift.net">matthias@lshift.net</a>></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>
> Brian Whitman wrote:<br>
>> I am concerned about this because over the weekend the broker crashed<br>
>> (not sure why yet, but I assume it had something to do with probably<br>
>> ~50m messages sitting in the exchange.) How can I have messages be<br>
>> completely transient?<br>
><br>
> This is done with the "immediate" flag for a message; if there is no<br>
> 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 'immediate' 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 'immediate' 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>