[rabbitmq-discuss] Design Decision

Tobias Bühlmann tbuehlmann.android at googlemail.com
Wed Apr 9 10:32:50 BST 2014


Hey,

I'm pretty new to RabbitMQ and AMQP in general and I have the feeling my 
design decisions regarding this problem might be wrong. 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.

Now, since the message payload will differ depending on the app type, my 
idea was to dynamically generate queues for each app for a notification. 
Having a notification with ID=42 and associated apps with IDS=110, 112, I 
would generate the queues "42_110" and "42_112". Then, consumer workers 
would be notified about the new queues and work them off. As the workers 
need the notification and app data in addition to the message payload 
itself, they could easily get it by splitting the queue name at "_" and 
querying the database.

Despite I think this could work, it just doesn't feel right. Is there any 
opinionated way to go? How would you design it? Appreciating any help. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140409/8bc4c791/attachment.html>


More information about the rabbitmq-discuss mailing list