[rabbitmq-discuss] Delivering to one and only one queue

Simon MacMullen simon at rabbitmq.com
Thu Sep 6 09:49:19 BST 2012


Sounds like the consistent hash exchange will do what you want?

http://hg.rabbitmq.com/rabbitmq-consistent-hash-exchange/raw-file/default/README.md

This ships with RabbitMQ as a plugin, but is disabled by default.

Cheers, Simon

On 05/09/2012 2:40PM, François Beausoleil wrote:
> Hi all!
>
> 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.
> """
>
> Any ideas?
>
> Thank you very much!
> François Beausoleil
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


More information about the rabbitmq-discuss mailing list