Integration / RabbitMQ Interview Questions
What is the difference between durable and transient queues?
Durability is a property of the queue's metadata, not of the messages inside it, which is a common source of confusion.
| Durable Queue | Transient Queue |
| Definition survives a broker restart. | Definition is lost when the broker restarts. |
| Declared with durable=true. | Declared with durable=false (the default in most clients). |
| Still needs persistent messages to keep message bodies across a restart. | Any messages inside are gone on restart regardless of delivery mode. |
In other words, a durable queue with non-persistent messages will still exist after a restart, but it will be empty - the queue survived, the messages did not.
More Related questions...