[openamq-dev] round-robin queues

Martin Sustrik sustrik at imatix.com
Sat Feb 9 14:11:04 CET 2008


Esteve,

This is interesting. We haven't seen a scenario that wouldn't fit AMQP 
model so far. May you share your use case with us? If your point of 
"this kind of problem can be solved only be creating > 1,000,000 queues" 
is strong enough it may even mean there is a problem in AMQP protocol 
itself.

Martin

Esteve Fernandez wrote:
> Hi all, is there way to dispatch messages only once if two queues are bound to 
> the same exchange with similar arguments? I guess it's easier to develop this 
> question with an example scenario:
>
> - a headers exchange "library"
> - A, B and C are different boxes, each having a consumer and a queue bound 
> to "library" with similar (but different) arguments:
>
> * A has a queue bound to "library" twice with the following headers:
> o type: magazine
> o type: book
>
> * B has a queue bound to "library" twice with the following headers:
> o type: book
> o type: dvd
>
> * C has a queue bound to "library" twice with the following headers:
> o type: dvd
> o type: magazine
>
> when, for example, a message with "type: magazine" is sent to "library", both 
> A and C receive them, as expected. Is there a routing scheme that allows to 
> do round-robin at the queue level, not at the consumer level? That is, if 
> such message is sent, either A or C receives it, but not both.
>
> The other approach that I came up with is to have a queue for each type 
> (magazine, book and dvd), the problem is that I might end up having a lot of 
> queues if I add more types. When Pieter responded to Terry, he said that 
> queue creation is cheap, but that creating so many queues might be slower 
> than having one queue per client.
>
> Cheers.
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev
>   



More information about the openamq-dev mailing list