[rabbitmq-discuss] Dynamic queue problem

Bhaskar teja prudhviy at gmail.com
Mon Sep 10 19:23:42 BST 2012

We have 20 different kinds of web notifications. we categorized them
into 5 * 4 and gave a routing key for each kind like -- documents
                                          -- wall
                                          -- issues
                                          -- tasks
each having 5 notifications of its kind. we have plans to make
rabbitmq handle e-mails via consumers. In future we thought of having
topic exchanges so that single event message from web app to rabbitmq
can route the messages appropriately like,
  --- web_notifs.documents
  --- mail.documents
  --- logging.documents
so we declared dynamic queues so that routing keys match via *.documents.
Is there a better way to design this with named queues, so that we can
run a single consumer for now?

How can i get the old dynamic queue name? I could not find any api in
python pika module.

On 9/10/12, Francesco Mazzoli <francesco at rabbitmq.com> wrote:
> At Mon, 10 Sep 2012 23:17:20 +0530,
> Bhaskar teja wrote:
>> How can we connect to the old dynamic queue so that we dont loose any
>> messages
>> in that queue?
> In AMQP you can use an empty queue name to connect to the last created queue
> -
> if you're not creating any other queues in the meantime that will help.
> Otherwise you can simply get the queue name and have an option to connect to
> an
> already declared queue, and manually provide that name.
> Or...
>> Is it a bad idea to use dynamically declared queues over named queues?
>> What are the advantages dynamic queue vs named queues?
> If you can give a name to a queue, I'd do it.  Dynamic queue are generally
> used
> for disposable queue (e.g. queue with auto_delete).  Not having to think
> about
> the name has its advantages, but can get annoying, as you experienced.
> --
> Francesco * Often in error, never in doubt

Thank you,
Bhaskar teja

More information about the rabbitmq-discuss mailing list