[zeromq-dev] Multicast and send/recv

Martin Sustrik sustrik at 250bpm.com
Mon Feb 22 14:53:32 CET 2010

gonzalo diethelm wrote:

>> Yes. I think using multicast for this kind of thing makes sense.
> And what kind of socket would you use? Since it has to be bidirectional,
> it seems as if REQ/REP or UPSTREAM/DOWNSTREAM are the only candidates,
> right?

Multicast will work only with PUB/SUB sockets. Thus, what you have to do 
is to create one PUB socket and one SUB socket in both supervisor and 
individual applications. Supervisor will use PUB socket to send the ping 
command, SUB to receive responses. Applications will use SUB socket to 
receive the ping and PUB socket to respond with their identities.

One more thought: Is 'ping' needed at all? What if applications just 
sent their identities once in a while to the supervisor?


More information about the zeromq-dev mailing list