[rabbitmq-discuss] broken release?

Emile Joubert emile at rabbitmq.com
Thu May 3 16:02:57 BST 2012


On 03/05/12 12:29, Aryeh Leib Taurog wrote:
> Is there any way to detect in the publisher whether or not messages 
> are actually being queued?  With pika 0.9.5, as I mentioned, there was 
> no indication of failure on either client.

The broker was blocking the producer and would have accepted the message
when more disk space became available. That is different from the broker
receiving the message and discarding it, or from the message being lost
due to the broker crashing. That's not what happened.

Publication is an asynchronous so there is no way to return an outcome
of the command as a value. You can attempt to detect a blocking broker
by using publish confirms with a timeout. See

A publisher can only be sure that a message was received by the broker
when a publish confirm is received. In your case the client probably
closed the socket while part of the message was still in network buffers.

> Is there a way to move the location on disk somewhere other than /var?

You can select a location for the logfiles and the database. See

> Would it be possible to configure RabbitMQ to discard *oldest* 
> messages as opposed to *newest* messages in situations where there 
> isn't enough memory?  I believe that qpid for example uses some kind 
> of circular buffer for message transport, so that would happen by 
> default.

To be clear, no messages were discarded. If you run out of memory (or
out of disk space with v2.8.2 and later) the broker will block producers
from sending any more messages until conditions return to normal.

> Is there any way I could receive an alert, say by e-mail, or at least 
> on some message queue, when flow-control events occur?  All I see 
> regarding 'monitoring' in the documentation are interactive tools.
> I would want to be alerted if:
>  * Memory usage exceeds a certain level
>  * Messages are paged to disk
>  * Disk usage exceeds a certain level

All log messages are also sent to amq.rabbitmq.log exchange, so you
could consume those messages to find out if limits are exceeded. You
could also query the broker state with the REST API (part of the
Management plugin). You could also use the output of the "rabbitmqctl
status" command to obtain this information.

There is no API for alerting when transient messages are paged to disk
and this happens transparently.


More information about the rabbitmq-discuss mailing list