FAQ: How to persist messages during RabbitMQ broker restart?

Frequently Asked RabbitMQ Question: How to persist messages during RabbitMQ broker restart?

This is a living document that is continually updated. Last updated Febryary 2026.

Messages, exchanges, and classic queues that are not durable and persistent will be lost during a broker restart. For classic queues, if you cannot afford to lose any messages, ensure your queue is declared durable, and your messages are sent with the delivery mode "persistent". For RabbitMQ, new queue types have been introduced that are durable and have persistent messages by default.

Declared your queue as durable

Queues and exchanges must be configured as durable to survive a broker restart. A durable queue only means that the queue definition will survive a server restart, not the messages in it.

Create a durable classic queue by specifying durable as true during the creation of your queue. In the RabbitMQ Management UI, in the queue tab, verify that the queue is marked with a "D" to confirm it is durable.

Set message delivery mode to persistent

Making a classic queue durable is not the same as making its messages persistent. Messages can be published with either a delivery mode set to persistent or transient. Set the delivery mode to persistent when publishing your message to keep it in your durable queue during a restart.

Quorum Queues

Quorum queues were designed with safety and clustering in mind for RabbitMQ. Quorum queues have persistent messages and are durable queues by default. Quorum queues are best suited for a multi-node configuration. Quorum queues

Streams

Streams also have message persistence always in LavinMQ and RabbitMQ. Streams are also durable. Streams support a retention policy and allow consumers to replay messages.

LavinMQ

All messages sent to a queue are persistent and written to disk. Message durability is ignored even when specified by the publisher. Getting started with LavinMQ

CloudAMQP - industry leading RabbitMQ as a service

Start your managed cluster today. CloudAMQP is 100% free to try.

13,000+ users including these smart companies