[rabbitmq-discuss] What does Rabbit do with messages that have been delivered and ack'd

Jerry Kuch jerryk at vmware.com
Tue Mar 6 16:44:42 GMT 2012


Hi, Mark:

The maintaining of messages is done at the queue end of the messaging pipeline,
not the exchange end.  Thus, if the message properties and bindings have
resulted in your message passing through the topic exchange into multiple
queues, then each of those queues will try to maintain the integrity of that
message, up to whatever guarantees you've asked for (e.g. persistence) until
it's been delivered to, and ACKed by (or delivered to a consumer who is in noAck
mode) somebody.

On any single given queue, the first consumer to consume and ACK a message 
from that queue tells Rabbit that it's free to forget about the message.  That 
same consumer, or another consumer on the same queue would only see the same
message again if the consumer either crashed before ACK-ing, or rejected the 
message, both of which would result in a re-queueing.

This is a good thing to ask about and be mindful of; a happy Rabbit is an empty
Rabbit, and application mis-designs (or failures of components at runtime) can
result in the broker hanging on to many messages that are either undelivered or
delivered but not properly ACKed, which over the long run leads to more work
for the broker, more consumption of RAM, eventually paging of messages to disk,
etc.  In production you'd always want to monitor to make sure there's not some
queue growing surprisingly long, since that's a sign that, at the very least
something has changed in your assumptions about the world, or that perhaps
you have a problem like slow or crashed consumers, a sudden upswing in producer
activity, etc.

Best regards,
Jerry

----- Original Message -----
From: "Mark Petrovic" <mspetrovic at gmail.com>
To: "Rabbit-Mq Discuss-Mailing List" <rabbitmq-discuss at lists.rabbitmq.com>
Sent: Tuesday, March 6, 2012 8:34:45 AM
Subject: [rabbitmq-discuss] What does Rabbit do with messages that have been	delivered and ack'd

I have an application that uses a topic exchange.  If I have N
consumers and each of those ack's the message when it is delivered to
them, Rabbit does not keep a  copy of that message beyond the last
consumer ack'ing it does it?

I ask because I want to know if there are exchange or queue
configurations that I may be inadvertently foisting on Rabbit brokers
that induce them to hold onto messages in its backing db that I
actually no longer care about.

Thanks much.

-- 
Mark
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list