0
0
RabbitMQdevops~20 mins

Binding keys and routing keys in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
RabbitMQ Routing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does a binding key affect message routing in RabbitMQ?

In RabbitMQ, what role does a binding key play when connecting a queue to a topic exchange?

AIt changes the message content before routing.
BIt encrypts messages before they reach the queue.
CIt filters messages so only those with matching routing keys are delivered to the queue.
DIt defines the maximum size of the queue.
Attempts:
2 left
💡 Hint

Think about how messages are selected for delivery to queues.

💻 Command Output
intermediate
2:00remaining
What is the output of binding a queue with '#' binding key?

Given a topic exchange and a queue bound with the binding key '#', which messages will the queue receive?

AOnly messages with routing key exactly '#'.
BOnly messages with routing keys containing a dot '.' character.
CNo messages will be received.
DAll messages sent to the exchange regardless of routing key.
Attempts:
2 left
💡 Hint

The '#' symbol in binding keys is a wildcard. What does it match?

Configuration
advanced
2:00remaining
Identify the correct binding key for routing keys starting with 'logs.'

You want a queue to receive messages with routing keys that start with 'logs.' followed by any words. Which binding key should you use?

Alogs.#
Blogs.*
C*.logs
D#.logs
Attempts:
2 left
💡 Hint

Remember '*' matches exactly one word, '#' matches zero or more words.

Troubleshoot
advanced
2:00remaining
Why does a queue not receive messages despite correct routing key?

A queue is bound to a topic exchange with binding key 'app.*.error'. Messages are published with routing key 'App.service.error' but the queue receives nothing. What is the likely cause?

AThe queue is not declared durable.
BThe routing key is case-sensitive and does not match.
CThe exchange type is incorrect; it should be direct instead of topic.
DThe binding key expects exactly one word between 'app' and 'error', but the routing key has two words.
Attempts:
2 left
💡 Hint

Check if the routing key matches the binding key pattern exactly, including case.

🔀 Workflow
expert
3:00remaining
Order the steps to bind a queue with a routing key in RabbitMQ CLI

Arrange the commands in the correct order to declare a queue, declare a topic exchange, and bind the queue with a binding key 'user.*.update'.

A2,1,3
B1,2,3
C3,2,1
D1,3,2
Attempts:
2 left
💡 Hint

Think about what must exist before you can bind.