[rabbitmq-discuss] Durable Exchanges, Queues and Persistent Messages

Matthew Sackman matthew at lshift.net
Tue Nov 10 17:26:02 GMT 2009


On Tue, Nov 10, 2009 at 10:22:09AM -0700, Derek Burdick wrote:
> I have a durable queue and exchange I am sending persistent messages to.
> The exchange is set as fanout.  What I am seeing, is that the messages are
> stored to disk but never removed.  If a new consumer comes up, he gets the
> entire history of that queue.
> 
> Is this the intended behavior of persistent fanout messages?

I suspect your consumer is not acknowledging messages. Messages are not
forgotten until the client confirms that they have received the message
by using basic.ack. This is required whether the client is doing
basic.get or using basic.consume.

Alternatively, in both basic.get and basic.consume, the noAck flag can
be set, indicating to Rabbit that it should not expect acks from the
client, and thus should forget about messages as soon as they've been
sent to a client.

I hope that's of use. If my guess is wrong, do please let us know!

Matthew




More information about the rabbitmq-discuss mailing list