[rabbitmq-discuss] Delivering to one and only one queue
francois at teksol.info
Wed Sep 5 14:40:03 BST 2012
I asked this question on StackOverflow yesterday, and I was looking to broaden the audience: http://stackoverflow.com/questions/12266488/routing-messages-to-one-and-only-one-queue
Here's a copy of the question:
I have a Topic exchange from which I'd like to distribute messages to two queues on two servers part of a cluster, in order to reduce memory pressure on any particular server. My consumers are periodically slow, and I sometimes run into the high memory watermark.
The way I tried to resolve this is by routing messages using an intermediate direct exchange, with two queues bound to the exchange:
a (topic) -> a1 (direct) -> q1/q2 (bound to routing key "a")
But the messages were routed to both queues, as AMQP intends. Anyone has ideas? What I need is an exchange that routes to one and only one queue, even if the routing key matches many queues. I'd prefer not to change my routing keys, but that could be arranged.
I found Selective routing with RabbitMQ, which may mean I'll need to implement my own routing logic. Hopefully, this already exists somewhere else.
Thank you very much!
More information about the rabbitmq-discuss