[zeromq-dev] PGM: multiple listener behavior?

Steven McCoy steven.mccoy at miru.hk
Thu Aug 9 18:20:19 CEST 2012

On 9 August 2012 11:33, CFK <cfkaran2 at gmail.com> wrote:

> Steven, this is all VERY interesting to me, because just like Stuart,
> I was planning on creating a bus as well.

Bus across the network works as of this commit three years ago:


Bus on a single socket is not supported: i.e. send and receive like TIBCO

I probably made a mistake before.

>  Since that won't work, I
> thought of a quick hack, but I want to see if it is supported; can you
> connect multiple multicast addresses to the same interface in ZMQ?  My
> thought is to make a pseudo-bus, where each member of a smallish set
> (10-15 nodes) publishes on its own address, but subscribes to all
> addresses in the set.

This is certainly supported: it is called asymmetric multicast.

>  Is it possible to connect the same interface to
> multiple multicast addresses, without causing any problems?  If so, is
> the following acceptable code?
> Assume that the following interfaces own the following addresses:
>  <->
>  <->
>  <->
>  <->
> Using the same port will multiply the received messages on Linux due to
how socket routing is implemented.

The alternative form is using a single PGM socket:

subscriber.connect("epgm://;,<>, <>,<> <>")

This receives on .11, .12, .13 and sends on .10.

<>1;,<>, <>,<> <>")
<>2;,<>, <>,<> <>")
<>3;,<>, <>,<> <>")

This tends to be easier with IPv6.

If this won't work in ZMQ, does anyone know if OpenPGM will support
> it?  I know that ZMQ's PGM/EPGM layer is built on OpenPGM, but I don't
> know if bus limitation is due to OpenPGM, or if it is because of how
> ZMQ uses it.  If OpenPGM can handle the above directly, I'll switch
> this chunk of my code to using it directly.

OpenPGM handles bus topology on the socket, it is designed to replicate and
enhance functionality of TIBCO Rendezvous.  However I think enough
functionality should be exposed with 0MQ to satisfy your requirements.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120809/0f803302/attachment.htm>

More information about the zeromq-dev mailing list