[rabbitmq-discuss] Question about architecture

Michael Beam mikebeam at mac.com
Thu Apr 28 18:06:54 BST 2011

Hi All,

I'm new to RabbitMQ and AMQP, and I'd like to see what people with more experience have to say about exchange & queue design.  I'm experimenting with using RabbitMQ to replace a homegrown thrift-based messaging solution that is used to relay change notifications from 10 or so CouchDB databases to several hundred running instances of our application.

My first thought was to create an exchange for each observed database observed, each exchange named after the database (i.e., couchdb_changes.db1 ... couchdb_changes.db10).  A routing key would be set for messages based on the value of some field in the database document. Each client application session would then create and bind a queue to each of the exchanges.

My second thought was that I could create a single exchange named "couchdb_changes", and then add the database name to the routing key. When binding queues to the exchange the application would also incorporate the database name into the routing key.

So, are there advantages or disadvantages between the two approaches here, or are they largely functionally equivalent.  I prefer the feel an exchange per observed database; just curious if there are established patterns that I should know about to better inform design decisions.


Mike Beam

More information about the rabbitmq-discuss mailing list