[rabbitmq-discuss] Exchange and queue naming conventions

Bill Moseley moseley at hank.org
Mon Jan 24 21:34:22 GMT 2011

On Mon, Jan 24, 2011 at 10:14 AM, David Wragg <david at rabbitmq.com> wrote:

> Hi Bill,
> Bill Moseley <moseley at hank.org> writes:
> > Are there any good conventions to follow when naming queues, exchanges,
> and
> > bindings?  As I'm adding more queues I'm starting to think some type of
> > naming convention would be very smart.  Just curious what other's do.
> I don't think there is any one right way.  When choosing names for
> queues, exchanges, and keys, the use of dotted paths is widespread.  But
> your questions are more about usage than naming.

Hi David,

I do think it makes sense to use the dotted notation, and then use topic
queues as that makes for very flexible routing options.  I was wondering if
anyone had worked out some "best practices" over time that would be useful
as we start to add more tasks.

I'm trying to break up some of our existing processes that are very tightly
coupled - the workers know quite a bit about the producers.  For example, a
worker might be configured to handle just one application in "QA" mode, and
another in "production" mode.  And likewise, the producer (in our current
system) must know where to send the message ("I'm in QA mode so I need to
send to the QA worker").

So, as an example I'm wondering about schemes where an app might use a
routing key of "app1.qa.rotate_image" which would allow us to configure
consumers that handles all image rotation for all apps and all modes, or
separate consumers based on the mode.

BTW -- in that case can I configure binding for three queues:
 *.qa.rotate_image. *.production.rotate_image, and then a third for all
except "qa" a and "production"?

Finally, I'm still a bit confused when to create new exchanges (assuming all
the same type).  Just trying to get some basic guidelines.  Is there any
overhead with using more exchanges vs. just more bindings on the same
exchange?  Is is common to use separate exchanges for grouping consumers
(i.e. an exchange for report queues and another exchange for image
manipulation queues)?

Thanks very much for your help,

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110124/7c9ff237/attachment-0001.htm>

More information about the rabbitmq-discuss mailing list