Challenge - 5 Problems
Headers Exchange Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Understanding headers exchange binding behavior
Given a headers exchange with a queue bound using headers {"x-match": "all", "format": "pdf", "type": "report"}, what happens when a message with headers {"format": "pdf", "type": "report"} is published?
Attempts:
2 left
💡 Hint
Remember that 'x-match' defines how headers are matched between binding and message.
✗ Incorrect
Headers exchange routes messages based on matching headers. When 'x-match' is 'all', all specified headers must match exactly for routing.
🧠 Conceptual
intermediate2:00remaining
Headers exchange matching modes
Which statement correctly describes the difference between 'x-match' set to 'any' and 'all' in a headers exchange binding?
Attempts:
2 left
💡 Hint
Think about how strict the matching should be for routing.
✗ Incorrect
'x-match' controls how headers are matched: 'all' means every header must match, 'any' means at least one header must match for routing.
❓ Configuration
advanced2:00remaining
Binding a queue with headers exchange using rabbitmqctl
Which rabbitmqctl command correctly binds a queue named 'reports' to a headers exchange 'docs_exchange' with headers {"x-match": "any", "format": "pdf", "type": "summary"}?
Attempts:
2 left
💡 Hint
Headers exchange requires specifying the exchange type and arguments correctly.
✗ Incorrect
The correct command uses set_binding with --queue, --exchange, --arguments for headers, and specifies the exchange type as headers.
❓ Troubleshoot
advanced2:00remaining
Diagnosing message routing failure in headers exchange
A message with headers {"format": "pdf", "type": "report"} is published to a headers exchange. The queue is bound with headers {"x-match": "all", "format": "pdf", "type": "summary"}. Why is the message not routed to the queue?
Attempts:
2 left
💡 Hint
Check the values of each header key carefully.
✗ Incorrect
With 'x-match' set to 'all', every header must match exactly. Here, 'type' is 'report' in the message but 'summary' in the binding, so no routing occurs.
🔀 Workflow
expert3:00remaining
Sequence to configure and test headers exchange routing
Arrange the steps in the correct order to configure a headers exchange and verify message routing for a queue bound with headers {"x-match": "any", "format": "json", "priority": "high"}.
Attempts:
2 left
💡 Hint
Think about the logical order: create exchange, bind queue, publish message, verify reception.
✗ Incorrect
First create the exchange, then bind the queue with headers, publish a message with matching headers, and finally check if the queue received it.