[rabbitmq-discuss] help - design pattern for an our use case

Bhaskar teja prudhviy at gmail.com
Wed Jul 18 06:41:07 BST 2012

Hi All,

Our website have daily active users around 50,000 and we want use rabbitmq
as message broker for "~real time web notifications" for lot of events
generated by users.
Need some help in designing for our use case. our requirements are as

1. Users are part of different communities, a user can be part of multiple
2. when a user uploads a Image, all the users in that community need to be
notified like on facebook.
3. users can form groups inside each community. the targeted group alone
need to be notified based on scenario.

here, user uploading an image is just one of the scenarios we have.
right now we have designed the following way,

Producer -
      Exchange name - "web notifications"
      Exchange Type - "direct"
      Routing key - "gallery"
      message body - { producer_user_Id: 123, target_user_Ids: [23, 45,
56], type: "image_upload" }
Consumer -
      Exchange name - "web notifications"
      Exchange type - "direct"
      Routing key - "gallery"
      queue name - no name given - auto generated
we are consuming the messages and processing them based on type in message
body and storing it in redis for each user in target_user_Ids,
so regardless of user being online or offline we are persisting
notifications and delivering them once user logs in.
we are not sure if the current design is proper since all messages from 50k
users are routed to only few queues( < 10 ) and few worker-consumers.
we also need to notify the users via e-mail about the events.
What is a good design pattern for our use case - like number of queues?,
exchange type?, number of exchanges( web, e-mail ) ??
Please let me know if anyone need more information.

Thank you,
Bhaskar teja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120718/2ede5294/attachment.htm>

More information about the rabbitmq-discuss mailing list