Challenge - 5 Problems
RabbitMQ Publisher 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 publish command?
You run the following command to publish a message to a RabbitMQ queue named
task_queue. What is the expected output or result?RabbitMQ
rabbitmqadmin publish routing_key=task_queue payload='Hello World!'Attempts:
2 left
💡 Hint
The default exchange is used if no exchange is specified, so the message goes directly to the queue.
✗ Incorrect
When you publish a message with rabbitmqadmin without specifying an exchange, it uses the default exchange which routes messages to the queue named by the routing key. If the queue exists, the message is accepted silently.
🧠 Conceptual
intermediate2:00remaining
Which RabbitMQ exchange type routes messages to all bound queues?
You want to send a message that all queues bound to an exchange will receive. Which exchange type should you use?
Attempts:
2 left
💡 Hint
Think of a loudspeaker broadcasting to everyone.
✗ Incorrect
A fanout exchange routes messages to all queues bound to it, ignoring routing keys. This is like broadcasting to all listeners.
❓ Configuration
advanced2:30remaining
Which configuration snippet correctly declares a durable queue and publishes a persistent message?
You want to ensure that your queue survives RabbitMQ restarts and that messages are not lost. Which configuration snippet achieves this?
Attempts:
2 left
💡 Hint
Durable queues and persistent messages require specific flags.
✗ Incorrect
Setting durable=True makes the queue survive restarts. Setting delivery_mode=2 marks messages as persistent so they are saved to disk.
❓ Troubleshoot
advanced2:00remaining
Why does this publish command fail with a channel error?
You run this command:
rabbitmqadmin publish exchange=logs routing_key=info payload='Test'
But it fails with a channel error. What is the most likely cause?
Attempts:
2 left
💡 Hint
Check if the exchange you are publishing to exists.
✗ Incorrect
Publishing to a non-existent exchange causes a channel error because RabbitMQ cannot route the message.
🔀 Workflow
expert3:00remaining
What is the correct sequence to publish a message with confirmation in RabbitMQ?
Arrange the steps in the correct order to publish a message and confirm it was received by RabbitMQ.
Attempts:
2 left
💡 Hint
You must enable confirms before publishing.
✗ Incorrect
First enable confirms, then publish, then wait for ack/nack, then handle errors if any.