[zeromq-dev] pub/sub and multicast
Goswin von Brederlow
goswin-v-b at web.de
Tue Jul 29 12:10:54 CEST 2014
On Wed, Jul 23, 2014 at 08:45:37PM +0000, McMillan, Scott A wrote:
> Hi,
>
> Sorry for the very basic question, I'm new to zeromq.
>
> The FAQ (http://zeromq.org/area:faq#toc0) says "PUB does multicast." How
> should I interpret this statement? Does this mean that IP-level multicast
> is required to use the pub/sub pattern?
No. PUB will simply unicast each message to every connected peer. So
to you it looks like multicast since zmq hides the details from you.
> Looking at the examples, it looks like the protocol can be selected
> independently from the pattern? E.g., several examples contain the
> following, which I interpret as the pub/sub pattern on top of TCP unicast:
>
> void *publisher = zmq_socket (context, ZMQ_PUB);
> zmq_bind (publisher, "tcp://*:5563");
>
>
> If one wanted to use multicast, then the second line would be replaced
> with something like:
>
> zmq_bind (publisher, "pgm://...");
>
>
> Am I understanding this correctly?
>
> Thanks,
> Scott
That is my understanding too.
MfG
Goswin
More information about the zeromq-dev
mailing list