0
0
RabbitMQdevops~5 mins

Message durability and persistence in RabbitMQ - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does message durability mean in RabbitMQ?
Message durability means that messages are saved to disk so they are not lost if the RabbitMQ server crashes or restarts.
Click to reveal answer
beginner
How do you make a queue durable in RabbitMQ?
You set the queue property 'durable' to true when declaring the queue. This makes the queue survive server restarts.
Click to reveal answer
intermediate
What is the difference between a durable queue and a persistent message?
A durable queue survives server restarts, but messages must also be marked persistent to be saved to disk and survive restarts.
Click to reveal answer
beginner
How do you mark a message as persistent in RabbitMQ?
When publishing a message, set the property 'delivery_mode' to 2. This marks the message as persistent.
Click to reveal answer
intermediate
Does marking a message as persistent guarantee it is never lost?
No. It reduces the chance of loss by saving to disk, but messages can still be lost if RabbitMQ crashes before writing to disk.
Click to reveal answer
What must be true for a message to survive a RabbitMQ server restart?
AThe queue is durable and the message is persistent
BThe queue is exclusive
CThe message is transient
DThe queue is auto-delete
How do you declare a durable queue in RabbitMQ?
ASet 'durable' to true when declaring the queue
BSet 'auto_delete' to true
CSet 'exclusive' to true
DSet 'delivery_mode' to 2
Which delivery_mode value marks a message as persistent?
A1
B2
C0
D3
If a queue is durable but messages are not persistent, what happens on server restart?
AMessages are saved but queue is lost
BMessages and queue are lost
CMessages are lost but queue remains
DBoth messages and queue survive
Which of these is NOT a guarantee of message durability?
AMessages are saved to disk
BMessages survive server crashes
CQueues survive server restarts
DMessages are never lost under any condition
Explain how to ensure messages are not lost when RabbitMQ restarts.
Think about queue and message settings that affect saving to disk.
You got /3 concepts.
    Describe the difference between durable queues and persistent messages in RabbitMQ.
    One is about the queue, the other about the message.
    You got /3 concepts.