[rabbitmq-discuss] Durable queues persister file size
0x6e6562 at gmail.com
Wed Sep 10 16:18:58 BST 2008
On Wed, Sep 10, 2008 at 1:49 PM, Eran Sandler <eran.sandler at gmail.com> wrote:
> As far as I understand, durable queues data get written into
> rabbit_persister.log file.
A durable queue is one whose definition will survive a broker restart.
You can still send a transient message to a durable queue, and if the
broker crashes or is restarted, that message will be lost.
To make sure that your messages are persistent, you need to set the
appropriate flag in the header properties when sending the message.
When you set the delivery mode on a message to be persistent, then the
broker will write it into the rabbit_persister.log file.
> When I send an Ack message, the message should be deleted from the
> rabbit_persister.log file, right?
Not necessarily. The semantics of the ack are such that an
acknowledged message will not get requeued as part of recovery.
This does mean or require that the message payload be removed
synchronously from the disk log. The disk log will be rolled over
In general the persister is designed to write messages as fast as
possible in the most efficient fashion that is still reliable. Second
to that it needs to record acks as efficiently as possible.
> The message doesn't exists but it seems that rabbit_persister keeps on
> growing (it about 170Mb at the moment).
If you are worried about this, you can force a snapshot by calling
rabbit_persister:force_snapshot (there is a target for this in the
Makefile as well, I don't it's exposed anywhere else).
More information about the rabbitmq-discuss