[rabbitmq-discuss] Groking the point of queues in topic exchanges
methodin
derekrw at gmail.com
Wed Feb 8 14:56:40 GMT 2012
Thanks for the explanation! I gather then that it is really an issue
of semantics as to how you want your queue to behave and not an issue
of doing it a correct way. This helps a lot!
On Feb 8, 5:57 am, Simon MacMullen <si... at rabbitmq.com> wrote:
> On 07/02/12 22:20, methodin wrote:
>
> > So when I was originally mapping out how to design an implementation
> > of RabbitMQ I assumed that an exchange could route messages to queues
> > and workers could consume solely off one of the queues. When I added
> > two queues in I found out that the message will get sent to both
> > queues and those both workers.
>
> > So I implemented a topic exchange and route to queues based on routing
> > keys. I am now, however, at a loss in figuring out the point of the
> > queues in this system as I could just as easily map 4 different keys
> > to the same queue vs. routing each one to their own queue. Is there a
> > large difference here? Should I be aiming for one approach vs the
> > other?
>
> So we're comparing one topic exchange with multiple routing keys all
> feeding into one queue, versus one topic exchange with multiple routing
> keys each feeding into a separate queue?
>
> There are a couple of differences which may or may not matter to you:
>
> 1) If more than one of your routing keys match a given message, that
> message would get duplicated to each queue in the multiple queue case.
>
> 2) By pushing all the messages into one queue you impose a total
> ordering on your messages, which you may want. But by splitting out the
> messages into multiple queues you may get better performance (if the
> performance of the queue is a limiting factor...)
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list