[zeromq-dev] PubSub Pattern use Multicast, Pub selects Subs

Brian Adamson brian.adamson at nrl.navy.mil
Mon Feb 9 17:36:55 CET 2015

At this time both the PGM and NORM reliable multicast bindings for ZeroMQ support a fairly loose multicast subscriber model where the sender doesn’t keep track of individual subscribers.  (I know this is the case for the NORM binding and I think the same for the PGM since the NORM binding is currently modeled somewhat after the PGM one). So, as you have observed, it doesn’t quite do what you want to do here.

I am in _progress_ of providing a NORM implementation pattern where “clients” (aka subscribers) do a sort of ‘connect' to a multicast “server” (aka publisher) so an application (like ZMQ) can do something much like what you described here.  My plan is to update the NORM binding in ZMQ to use this pattern (along with maintaining support for the “looser” multicast subscriber model that has a little less overhead as the multicast group size scales up.  The implementation pattern I’m working provides for both hybrid/asymmetric (multicast server->clients and unicast client->server) connection as well as symmetric unicast client-server connections so that the set of ZMQ socket types that NORM supports can be expanded.  There may be some interesting possibilities for use of the hybrid/asymmetric multicast/unicast connection.

In the meantime, you could possibly get an approximate version of the functionality you want by using both a multicast (PGM or NORM) socket _and_ individual unicast (TCP) connections for some signaling to manage what gets sent over the multicast socket?

> On Feb 9, 2015, at 4:26 AM, Wang Wei <wangwei at comp.nus.edu.sg> wrote:
> Hi everyone,
> I am trying to use zeromq to implement a system () which consists of one publisher and multiple subscribers.
> The message size is large (larger than 1MB), hence I want to use multicast to save some network cost.
> The filtering topics of subscribers are changing dynamically. But the publisher knows who are waiting for the message to be sent. Hence I want the publisher to filter some subscribers and use multicast to send the messages to all other waiting subscribers.
> It seems that the PubSub does not satisfy my requirements.
> Would you please give me some suggestions on this problem? Is there any pattern in zeromq support such requirement?
> Thanks.
> regards,
> wang wei
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list