[rabbitmq-discuss] Routing Topologies - Multiple Queues vs One Queue
Michal Levý
michal.liwoj at gmail.com
Sat Dec 29 11:41:05 GMT 2012
Hi Adam
Sorry but its obvious from your question that you dont understand AMQP
basics.
Scenarios you describe are very different. For example, in scenario #2 you
are using one queue. If there are more consumers on single queue, only
single consumer will get each message (rabbit will alternate between
consumers in round-robin fashion). Its also not possible to subscribe to
queue and get only messages with specified routing key. You always get all
messages from that queue (if you are only subscriber). Last but not least,
there is no way to publish messages with different routing keys into single
queue using direct exchange because when using direct exchange, routing key
is used as queue name...
It would be better for you to check tutorial<http://www.rabbitmq.com/getstarted.html>and AMQP
concepts <http://www.rabbitmq.com/tutorials/amqp-concepts.html> on rabbit
website first
HTH
Michal
On Friday, December 7, 2012 2:20:49 AM UTC+1, Adam Venturella wrote:
>
> My goal is to segregate tasks to different consumers. My messages are very
> simple, I just may have a lot of them.
> Assuming a direct exchange (no topics), is it better to have N queues with
> 1 routing key per queue:
>
> Queue: foo
> Routing Key: tasks
>
> Queue: bar
> Routing Key: tasks
>
> Queue: baz
> Routing Key: tasks
>
>
> OR
>
> Is it better to have 1 queue with N routing keys.
>
> Queue: Tasks
> Routing Key: foo
> Routing Key: bar
> Routing Key: baz
>
> My assumption is multiple routing keys are better.
> Any advice?
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121229/9da03a67/attachment.htm>
More information about the rabbitmq-discuss
mailing list