Challenge - 5 Problems
RabbitMQ Consumer Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this RabbitMQ consumer command?
You run this command to consume messages from a queue named
task_queue. What output will you see if the queue is empty?RabbitMQ
rabbitmqadmin get queue=task_queue requeue=false count=1Attempts:
2 left
💡 Hint
Think about what happens when you try to get a message from an empty queue.
✗ Incorrect
The command tries to get one message from the queue without requeuing. If the queue is empty, it returns no messages without error.
❓ Configuration
intermediate2:00remaining
Which configuration enables manual message acknowledgment in RabbitMQ consumer?
You want your consumer to manually acknowledge messages after processing. Which consumer configuration option achieves this?
Attempts:
2 left
💡 Hint
Manual acknowledgment means the consumer tells RabbitMQ when a message is done.
✗ Incorrect
Setting
auto_ack=false disables automatic acknowledgment, so the consumer must manually acknowledge messages.🔀 Workflow
advanced3:00remaining
What is the correct order to consume and acknowledge a message manually?
Arrange these steps in the correct order for a RabbitMQ consumer that manually acknowledges messages.
Attempts:
2 left
💡 Hint
Think about when you should acknowledge a message.
✗ Incorrect
You first receive the message, then process it, then acknowledge it, and finally wait for the next message.
❓ Troubleshoot
advanced2:30remaining
Why does this RabbitMQ consumer fail to receive messages?
A consumer is connected but does not receive any messages from the queue. The consumer code uses
auto_ack=true and prefetch_count=1. What is the most likely cause?Attempts:
2 left
💡 Hint
Consider what happens if the queue has no messages or they are already consumed.
✗ Incorrect
If the queue is empty or messages are already acknowledged, the consumer will not receive any messages despite being connected.
✅ Best Practice
expert3:00remaining
Which practice improves reliability when consuming messages in RabbitMQ?
You want to ensure no messages are lost if your consumer crashes during processing. Which practice is best?
Attempts:
2 left
💡 Hint
Think about how to avoid losing messages if the consumer crashes.
✗ Incorrect
Manual acknowledgment lets the consumer confirm message processing only after success, preventing message loss on crashes.