[rabbitmq-discuss] Design Decision

Michael Klishin mklishin at gopivotal.com
Thu Apr 10 11:07:12 BST 2014

On 9 April 2014 at 18:03:44, Tobias Bühlmann (tbuehlmann.android at googlemail.com) wrote:
> > So, the problem: I have a relational database with a notifications  
> table where each notification has many associated apps. Each  
> app has itself many devices. Now, a producer will check the table  
> for new notifications with a specific state. If there are any,  
> grab them and produce a message for each device in each app associated  
> with the new notification. After that, some consumer workers  
> will work the queue(s) off and deliver the messages to the devices.  


Can you elaborate how apps and devices are named? Does the publisher
know much about them? This is a very important detail.

If I understand your scenario correctly, all devices across all apps
should get notifications of a specific kind. If so, you can make your consumers
declare server-named queues (their names won’t be known to the publisher)
and bind them to a topic exchange with a pattern like this:


As long as routing can happen on the type, the publisher won’t have to know
anything about consumers. This is largely the point of the exchange/queue separation
in the protocol. 

Software Engineer, Pivotal/RabbitMQ

More information about the rabbitmq-discuss mailing list