0
0
RabbitMQdevops~5 mins

Queue TTL and auto-expiry in RabbitMQ - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does TTL mean in the context of RabbitMQ queues?
TTL stands for Time-To-Live. It is the time duration a message or queue can live before it is automatically deleted or expired.
Click to reveal answer
beginner
How do you set a TTL for messages in a RabbitMQ queue?
You set the TTL by adding the argument "x-message-ttl" with a value in milliseconds when declaring the queue.
Click to reveal answer
intermediate
What happens when a queue reaches its auto-expiry time in RabbitMQ?
The queue is automatically deleted if it has been unused for the specified auto-expiry time.
Click to reveal answer
intermediate
Which argument controls the auto-expiry of a queue in RabbitMQ?
The argument "x-expires" controls the auto-expiry time in milliseconds for a queue.
Click to reveal answer
advanced
Can TTL be set for both messages and queues in RabbitMQ?
Yes, TTL can be set for individual messages using the "expiration" property and for queues using the "x-message-ttl" and "x-expires" arguments.
Click to reveal answer
What does the "x-message-ttl" argument specify in RabbitMQ?
ATime in seconds a queue stays active
BMaximum number of messages in a queue
CTime in milliseconds a message stays in the queue before expiring
DPriority of the queue
What does the "x-expires" argument do for a RabbitMQ queue?
ADeletes the queue after it has been unused for the specified time
BSets the maximum message size
CSets the queue priority
DLimits the number of consumers
If a message TTL expires, what happens to the message?
AIt is moved to the front of the queue
BIt is removed from the queue
CIt is duplicated
DIt is sent to all consumers
Which of these is NOT a valid TTL or expiry setting in RabbitMQ?
A"x-priority-ttl"
B"x-expires"
C"x-message-ttl"
D"x-max-length"
How is TTL specified when declaring a queue in RabbitMQ?
AAs a consumer property
BAs a string with time units
CAs a boolean flag
DAs an argument in milliseconds
Explain how TTL and auto-expiry work in RabbitMQ queues and messages.
Think about how time limits help clean up old messages and queues.
You got /5 concepts.
    Describe how you would configure a RabbitMQ queue to delete itself after 10 minutes of inactivity.
    Remember that 1 minute = 60000 milliseconds.
    You got /4 concepts.