0
0
RabbitMQdevops~20 mins

Dead letter exchanges and queues in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Dead Letter Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Purpose of Dead Letter Exchanges

What is the main purpose of a dead letter exchange (DLX) in RabbitMQ?

ATo speed up message delivery by bypassing normal queues
BTo automatically delete messages after they are consumed
CTo encrypt messages before they reach the consumer
DTo route messages that cannot be delivered or are rejected to a special queue for later inspection
Attempts:
2 left
💡 Hint

Think about what happens to messages that fail processing or expire.

💻 Command Output
intermediate
2:00remaining
Output of Declaring a Queue with DLX

What is the output or effect of running this RabbitMQ CLI command?

rabbitmqadmin declare queue name=myqueue durable=true arguments='{"x-dead-letter-exchange":"dlx-exchange"}'
ACreates a queue named 'myqueue' but ignores the dead letter exchange argument
BCreates a durable queue named 'myqueue' that sends rejected or expired messages to 'dlx-exchange'
CFails with a syntax error due to incorrect JSON format in arguments
DCreates a non-durable queue named 'myqueue' without dead letter functionality
Attempts:
2 left
💡 Hint

Check how the 'arguments' parameter is used to set dead letter exchange.

🔀 Workflow
advanced
2:30remaining
Configuring Dead Letter Queue Workflow

Which sequence of steps correctly sets up a dead letter exchange and queue in RabbitMQ?

A1,2,3,4
B3,1,2,4
C2,1,3,4
D1,3,2,4
Attempts:
2 left
💡 Hint

Think about the order: exchanges and queues must exist before binding and usage.

Troubleshoot
advanced
2:00remaining
Troubleshooting Missing Dead Letter Messages

You configured a queue with a dead letter exchange, but messages rejected from the queue do not appear in the dead letter queue. What is a likely cause?

AThe dead letter queue is not bound to the dead letter exchange with the correct routing key
BThe main queue is not durable
CThe dead letter exchange type is set to 'fanout'
DThe messages are not published as persistent
Attempts:
2 left
💡 Hint

Check bindings between exchange and queue carefully.

Best Practice
expert
3:00remaining
Best Practice for Handling Poison Messages

What is the best practice for handling poison messages (messages that always fail processing) in a RabbitMQ dead letter queue setup?

ARe-publish poison messages endlessly to the main queue to retry processing
BAutomatically delete poison messages from the dead letter queue to save space
CSet a maximum retry count and move poison messages to a separate queue for manual inspection
DIgnore poison messages and let them accumulate in the dead letter queue
Attempts:
2 left
💡 Hint

Think about how to avoid infinite retry loops and keep the system healthy.