FAQ: What is the delivery mode in AMQP?

There seems to be two options available for “delivery mode” in AMQP, namely non-persistent and persistent. What does this actually mean?

The delivery mode has a well-defined meaning in the AMQP 0.9.1 specification. It controls how the broker treats the message from a durability standpoint. Delivery mode for a message can be set to:

  • non-persistent (default)
  • persistent

The value of the delivery mode will tell RabbitMQ if it’s allowed to keep the message in memory when the message is placed in a queue (non-persistent) or if it must store the message on disk first (persistent).

Messages marked as persistent messages that are delivered to durable queues will be stored to the disk. Please note that the recommended queue type, Quorum Queues, can only be declared durable, otherwise an PRECONDITION_FAILED error message is raised. In the event of a crash, these durable queues will be recovered along with any persistent messages stored prior to the crash.

Email us at support@cloudamqp.com if you have any questions!

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