[zeromq-dev] Design questions for an event notification system.

Joe Lin jlin at peaxy.net
Fri Feb 28 05:59:38 CET 2014


Hi,

I'm planning to implement a notification system that is composed of topics.
Event subscribers subscribe to topics and receive events that are published
to the topics. The number of topics could be in the range of 5K.
Subscribers and publishers are in the range of 10K-50K.

My plan is to use a XPUB-XSUB in a broker to mediate event flow.  I have
two options of how to use the broker:
1. Use a single broker and have all subscribers connect to it via a SUB
socket. A subscriber will make multiple subscribe() calls for the
interested topic such as "/music/jazz", "/music/jazz/classic" ...etc.
2. Create separate brokers for each topic and have subscribers connect to
multiple brokers.

Which design will yield better performance? Pros and Cons of each option?

Another question is that assuming I structure the topic as a tree. such as:
/
 |
  ---music
      |
      --- classic
      --- modern

The requirement is that the event subscription should be 'inherited'. e.g.
if a subscription is done at '/music/modern', the subscriber would get
events published at both '/music', and '/music/modern'. Any suggestion of
how this can be done?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140227/4d8341f2/attachment.htm>


More information about the zeromq-dev mailing list