[zeromq-dev] Any way to get info on subscribers?

Martin Lucina mato at kotelna.sk
Sat Jul 24 14:20:57 CEST 2010


ph at imatix.com said:
> Knowing the number of subscribers also lets a publisher take votes, e.g. to
> detect network failures, and other fun things. If you want to create a
> high-availability publisher pair that coordinate with each other, the number of
> active subscribers is key knowledge a publisher needs to decide its on a dead
> network link.

The mere *presence* of a TCP connection to a peer does not indicate that
peer is active in any way.

Therefore, assuming the naive case where the underlying transport is
exclusively TCP, and you have a PUB socket with X SUBs connected to it,
implementing a 0MQ socket option to return X on the PUB side would in no
way help you with "detecting network failures".

It may of course help you to do "other fun things" :-)

-mato



More information about the zeromq-dev mailing list