I am going through the documentation of AMQP given by Rabbitmq official site. It says that
Queue Durability Durable queues are persisted to disk and thus survive broker restarts. Queues that are not durable are called transient. Not all scenarios and use cases mandate queues to be durable.
Durability of a queue does not make messages that are routed to that queue durable. If broker is taken down and then brought back up, durable queue will be re-declared during broker startup, however, only persistent messages will be recovered.
However I am confused about following scenarios, when Message broker crashes :-
- Message is delivered to Message Exchange by producer, but not routed to queue marked as durable.
- Message is delivered to Message Exchange by producer, which in turn routes to queue marked as durable, but message is in the queue and not consumed by consumer.
- Message is delivered to Message Exchange by producer, which in turn routes to queue marked as durable, but message is in the queue and consumed by consumer, but no acknowledgement has been send by consumer to the queue.
In all the above cases, will the messages be available on next start of rabbit-mq server ?
Moreover, the documentation makes distinction between normal message and persistent messages, as only persistent messages will be recovered. What's the difference between both message types ?
Thanks in advance.