title: ZeroMQ distribution pattern
body: <p>I currently have a pub/sub system running which allows clients to connect to a central message routing daemon, subscribe for a range of messages, and then start chattering away. The routing daemon tracks and maintains each subscriber's messages of interest (based on a simple tag) and delivers the appropriate messages of interest as each of the subscribers produce them. Essentially, each connection is considered a potential publisher <em>OR</em> subscriber <em>AND USUALLY</em> both, the daemon handles the routing and delivery as needed.</p>
  
  <p>For example, three clients all connect and subscribe for their message tag(s) (MT) of interest:</p>
  
  <pre><code>Client 1(C1) subscribes to MT =&gt; 123
  Client 2(C2) subscribes to MT =&gt; 123 &amp; 456
  Client 3(C3) subscribes to MT =&gt; 123 &amp; 456 &amp; 789
  
  C1 produces MT 456: daemon delivers a copy to C2 and C3
  C2 produces MT 123: daemon delivers a copy to C1 and C3 (not self)
  C3 produces MT 999: daemon delivers it to none (nobody subscribed)
  </code></pre>
  
  <p>ZeroMQ came up in a discussion with a coworker and after tinkering with it for a few days I don't think I'm seeing the proper pattern for implementing/replacing the system that we currently have in place. Additionally, I would like to use EPGM in order to take advantage of the multicast gains and to eliminate the TCP based daemon, monkey in the middle, that I currently have.</p>
  
  <p>Any suggestions?</p>