[rabbitmq-discuss] Custom Routing?

Alexis Richardson alexis at rabbitmq.com
Sun Feb 13 20:26:56 GMT 2011


IIUC you are talking about this case:
http://www.rabbitmq.com/tutorial-three-python.html  In this instance
you would use (1) in your list below. Does that make sense?  Let me
know if I have misunderstood.

Note: in your (C) your phrase "only once" opens a potential can of
worms.  Please do feel free to describe your use case in more detail
if the above proves helpful.


On Fri, Feb 11, 2011 at 8:47 AM, Bill Wannamaker
<bill.wannamaker at gmail.com> wrote:
> Folks,
> 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?(consumerRoutingTag, messageRoutingTag)*
>    is true.
> * 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
>    that consumer?
> 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
> https://github.com/rabbitmq/rabbitmq-external-exchange
> Thanks a bunch!
> _______________________________________________
> 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