CodePark/ questions / RabbitMQ: exchanges, queues & routing
START PRACTICINGPRACTICE
Backend question · Message queues & streaming › RabbitMQ: exchanges, queues & routing

A queue is bound to a topic exchange with the binding key *.payment.#. Which routing key will NOT reach the queue?

payment.failed

payment.failed does not reach the queue. In *.payment.#, the * must match exactly one word before payment. payment.failed has no word there, so it does not match.

# matches zero or more words. So these both match:
•
eu.payment, with zero words after payment.
•
eu.payment.failed.retry, with two words after payment.