RabbitMQ

Publisher Confirms & Persistence

Guarantee the broker actually stored a message — survive broker restarts without losing data.

Consumer acks protect the consumer side, but the producer also needs assurance that the broker received and safely stored a message. Publisher confirms provide this: after enabling confirm mode, the broker sends the producer an async ack once it has taken responsibility for the message (and persisted it, if durable). A nack means the broker could not, so the producer should retry.

Sending a registered parcel and waiting for the post office's receipt that it is logged in their system — not just dropping it in a mailbox and hoping. And storing it in a fireproof safe (durable + persistent) so an overnight fire (restart) does not destroy it.

Key Concepts

1
Durability has three independent layers that must all be set: the queue must be declared durable, the message must be marked persistent (delivery mode 2), and ideally it should be on a quorum queue replicated across nodes. Miss any layer and a broker restart can drop messages — for example a persistent message in a non-durable queue still dies with the queue.
2
Together, durable queues + persistent messages + publisher confirms give end-to-end at-least-once from producer to broker.