[rabbitmq-discuss] Message persistence problems?

Matthew Sackman matthew at rabbitmq.com
Fri Oct 1 23:21:18 BST 2010

On Fri, Oct 01, 2010 at 09:32:56PM +0000, DandyLoon at gmail.com wrote:
> I've got a stock rabbitmq 2.1.0 installation on CentOS with no extra
> plugins or configuration beyond setting up ip/port/etc.
> I'm having a problem with message persistence - I can send and
> receive messages with delivery_mode=2 and verify that rabbit's temp
> files grow and shrink as expected. If I run 'rabbitmqctl stop' while
> there are persistent messages in the queue and then restart rabbit,
> those messages are still in the queue when the broker comes back up.
> If I kill -9 the erlang processes instead of doing a clean shutdown
> (testing a crash scenario), the queue comes back up empty. Is this
> expected behavior?

Yes. The only scenario in which AMQP makes any guarantees about msgs
being written to disk is if the messages are published persistent to a
durable queue with transactions. Anything less than this is a "best
effort" basis only.

As you'll no doubt soon discover, one tx.commit (aka fsync) per msg
creates an enormous performance hit.


More information about the rabbitmq-discuss mailing list