[openamq-dev] round-robin queues

Esteve Fernandez esteve at sindominio.net
Sun Feb 10 21:20:02 CET 2008


El Sábado 09 Febrero 2008 14:53:48 Pieter Hintjens escribió:
> Short answer: no.  Longer answer: round-robining is what single queues
> are designed for.  Queues are designed to be entirely independent of
> each other.  If you are trying to use multiple queues but in a
> dependent fashion, your model wrong.

Probably it is, I'm still an AMQP newbie :-)

> Lastly, my suspicion is that you may be solving a non-issue.  If you
> use a single queue to handle many types of message, they will also be
> round robined, the only difference between a million types in 1 queue
> and 1 type in each of a million queues is that messages will be
> processed with less granularity, i.e. small ones may get stuck behind
> large ones.

But messages must be independent between each other, there's no way to group 
them together: boxes A and B both handle books, but box A also handles 
magazines, whereas B handles dvds instead. I don't know if there's another 
way of filtering out dvds messages for box A than creating a queue for each 
type.

> So, my guess is that your ideal architecture consists of a very small
> number of queues (two?) that reflect the average size of the message
> type.  You put books and magazines in one queue, and dvds in the
> other.

The problem is that box B is handling books and dvds, but not magazines. If 
the consumer at B is listening for messages in the magazines-books and dvds 
queues, it will receive those messages with type = magazine too.

Cheers.


More information about the openamq-dev mailing list