[rabbitmq-discuss] using a topic exchange to route to multiple queues
Matthias Radestock
matthias at rabbitmq.com
Mon Dec 6 20:48:17 GMT 2010
On 06/12/10 19:50, Christian Legnitto wrote:
> I think Daniel was asking if it is possible to create automatic
> bindings based on queue name. From my reading, it sounds like he
> wants all messages that match "company.#" to be routed to any queue
> which has a name that starts with "company." (feel free to correct me
> Daniel).
Sure, but way to achieve the intended outcome is to publish with a
routing key of "company" and bind the queues with binding keys
"company" and "company.MSFT".
One doesn't even need a topic exchange for that; a direct exchange will
work just fine.
More generally, if we have some hierarchical naming scheme for queues
and want to publish messages to any level in the hierarchy then we'd
bind a queue named "K_0.K_1....K_N" with bindings "K_0", "K_0.K_1",
...,"K_0.K_1....K_N".
Matthias.
More information about the rabbitmq-discuss
mailing list