Message TTL — Concept Check
Questions on Message TTL. Set x-message-ttl (queue-level) or the expiration property (per-message) to expire messages not consumed within the specified milliseconds; expired messages are dead-lettered.
Questions in this quiz
8 questions on Message TTL — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A message in a queue with `x-message-ttl` set to 30000 milliseconds is buried behind other messages. What happens if it reaches the head of the queue after 31000 milliseconds?
- AIt is immediately delivered to the consumer.
- BIt resets its TTL and waits again.
- CIt remains in the queue until consumed.
- DIt is expired and dead-lettered or dropped.
2.A producer sets a per-message TTL of 20000 milliseconds on a message. The message is buried behind others with longer TTLs. What might happen?
- AIt will be delivered before messages with longer TTLs.
- BIt may not expire until it reaches the head of the queue.
- CIt will expire exactly after 20000 milliseconds, regardless of position.
- DIt will be dropped immediately if not consumed in 20000 milliseconds.
3.A queue is configured with `x-message-ttl` of 60000 milliseconds and no DLX. What happens to expired messages?
- AThey are requeued with a new TTL.
- BThey are delivered to the consumer with a warning.
- CThey are moved to a default DLX.
- DThey are silently dropped.
4.A message with `expiration` set to 5000 milliseconds is sent to a queue. What is a potential issue if the queue has many messages with longer TTLs?
- AThe message might not expire until it reaches the front.
- BThe queue will reorder messages based on TTL.
- CThe message will expire exactly at 5000 milliseconds.
- DThe message will be delivered first due to shorter TTL.
5.A developer configures a queue with `x-message-ttl` and a DLX. What pattern can this configuration help implement?
- ARetry-with-delay
- BPermanent message storage
- CImmediate retry
- DPriority-based delivery
6.What is the primary difference between queue-level TTL and per-message TTL?
- AQueue-level TTL applies to all messages, per-message TTL is set individually.
- BQueue-level TTL is faster to process than per-message TTL.
- CQueue-level TTL requires a DLX, per-message TTL does not.
- DQueue-level TTL is checked on delivery, per-message TTL at the queue head.
7.A message with `expiration` set to 10000 milliseconds is not consumed in time. What happens if the queue has a DLX configured?
- AIt is immediately consumed by the next available consumer.
- BIt remains in the queue indefinitely.
- CIt is routed to the DLX after expiration.
- DIt is dropped and not routed anywhere.
8.What happens when a message in a queue with `x-message-ttl` reaches its TTL but the queue has no DLX?
- AThe message is moved to a default DLX.
- BThe message is requeued with a new TTL.
- CThe message is dropped silently.
- DThe message is delivered with a delay.