Skip to main content
InterviewHubPRO
Section Overview
Q7

Question 7 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

14%
RabbitMQ & AMQP (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is Queue Durability vs. Message Persistence?

junior LevelData Structures

In Simple Words: To survive a RabbitMQ broker restart without data loss, both the queue and the message must be configured for persistence:

  1. Durable Queue (durable: true): The queue definition is saved to disk. When RabbitMQ restarts, the queue automatically re-registers. (A non-durable/transient queue disappears on restart).
  2. Persistent Message (deliveryMode: 2 or persistent: true): Tells RabbitMQ to write the message payload to its on-disk write log before acknowledging the publisher. Warning: If you publish a non-persistent message to a durable queue, the queue survives a broker reboot, but the message itself is lost!