0
0
RabbitMQdevops~5 mins

Message TTL (Time To Live) in RabbitMQ - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does TTL stand for in RabbitMQ?
TTL stands for Time To Live. It is the time a message can stay in a queue before it is discarded or dead-lettered.
Click to reveal answer
beginner
How do you set a message TTL for a queue in RabbitMQ?
You set the message TTL by adding the argument 'x-message-ttl' with a value in milliseconds when declaring the queue.
Click to reveal answer
beginner
What happens to a message when its TTL expires in RabbitMQ?
When a message's TTL expires, RabbitMQ removes it from the queue. It can be discarded or sent to a dead-letter exchange if configured.
Click to reveal answer
intermediate
Can you set TTL for individual messages in RabbitMQ?
Yes, you can set TTL for individual messages by adding the 'expiration' property in the message properties, specifying TTL in milliseconds.
Click to reveal answer
intermediate
What is the difference between queue TTL and message TTL in RabbitMQ?
Queue TTL ('x-message-ttl') sets the TTL for all messages in the queue. Message TTL ('expiration' property) sets TTL per message. The shorter TTL applies.
Click to reveal answer
What does setting 'x-message-ttl' on a queue do?
ASets how long the queue itself exists
BSets how long messages stay in the queue before expiring
CSets the maximum size of the queue
DSets the priority of messages in the queue
How can you set TTL for a single message in RabbitMQ?
ABy setting the 'expiration' property in the message properties
BBy setting 'x-message-ttl' on the queue
CBy setting the queue's max length
DBy setting the message priority
What happens to a message after its TTL expires in RabbitMQ?
AIt is removed from the queue and discarded or dead-lettered
BIt is moved to the front of the queue
CIt is duplicated and sent to all consumers
DIt is archived for later processing
If both queue TTL and message TTL are set, which TTL applies?
ATTL settings are ignored
BOnly the queue TTL applies
CThe shorter TTL between queue and message TTL
DOnly the message TTL applies
Which unit is used to specify TTL values in RabbitMQ?
AMinutes
BSeconds
CHours
DMilliseconds
Explain how message TTL works in RabbitMQ and how you can configure it.
Think about how long messages live and what happens when time runs out.
You got /4 concepts.
    Describe the difference between queue-level TTL and message-level TTL in RabbitMQ.
    Consider the scope of TTL settings and their priority.
    You got /4 concepts.