[rabbitmq-discuss] Custom Routing?
bill.wannamaker at gmail.com
Fri Feb 11 08:47:08 GMT 2011
I'm new to AMQP and RabbitMQ and had some questions about how I should
go about modeling the following problem with exchanges and queues:
A. I have consumers with a routing tag (not unique -- multiple
consumers may have the same routing tag)
B. Messages are enqueued with a routing tag.
C. Each message should be delivered only once to a consumer among the
set of consumers for which the function
* canConsume?(aTag, msgTag) = ((aTag & msgTag) == msgTag)
How do I go about configuring my exchange and queues? Do I...
1. Create a queue for each consumer and create a rabbit_exchange_type
that only delivers to a queue for which canConsumer? is true
2. Create a queue for each consumerRoutingTag (multiple consumers can
end up on the same queue) and create a rabbit_exchange_type that
only delivers to a queue for which canConsumer? is true
3. Have a single queue and then somehow scan each consumer for which
canConsumer? is true for each incoming message and then deliver to
I would appreciate any guidance here on how to route messages most
effectively to consumers given the above scenario. Further, if I write
my own rabbit_exchange_type, is there support in RabbitMQ for helping
me fairly distribute messages across the candidate lists? Would the
rabbit_exchange_type be the same as
Thanks a bunch!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss