[rabbitmq-discuss] Delivering to one and only one queue
francois at teksol.info
Thu Sep 6 13:44:15 BST 2012
I replied much too soon :( Does the consistent hash exchange accept strings as routing keys, and compute a hash from it? From the example, it appears not:
routing_key = list_to_binary(integer_to_list(random:uniform(1000000))
My routing keys have a consistent format, of the form "persona.qualified.UUID". The UUID part is what would trigger the consistent hash, because the rest of the routing key is constant.
Le 2012-09-06 à 04:49, Simon MacMullen a écrit :
> Sounds like the consistent hash exchange will do what you want?
> 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
More information about the rabbitmq-discuss