[rabbitmq-discuss] Hash Exchange with temporary queues

sinsei jsinsel at precysesolutions.com
Wed Apr 17 18:21:50 BST 2013


I'm currently investigating RabbitMQ to perform some scenarios that our
software needs.  One of these is to process messages for a particular group
on the same consumer so that updates done to our database happen in order. 

Since grouping isn't built-in to RabbitMQ, I thought about using the hash
exchange plugin. This way updates for a particular ID go to the same bucket
and the same consumer. So when a consumer hooks up to the exchange, they
create an exclusive, temporary queue. Then I can add consumers dynamically
and they would automatically receive a bucket.

The problem I've noticed is that when I shut down a consumer, some messages
are just lost. I wasn't sure how to set this up as dead-letter-exchanges
won't work for this case. Is there a way I can ensure those messages are
passed somewhere else?

Also, what happens if I have no consumers, it appears the messages are just
gone.  I may have to set up an alternative exchange?

I've also considered adding some grouping as a plugin so I could have a
single durable, trunk queue, but I'm unsure if it is possible with the
current plugin model.



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/Hash-Exchange-with-temporary-queues-tp26051.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list