[zeromq-dev] How to detect if a remote socket has closed

Pieter Hintjens ph at imatix.com
Wed Aug 25 10:21:03 CEST 2010

On Tue, Aug 24, 2010 at 5:41 PM,  <david.briant at ubs.com> wrote:

> Just rereading this thread. Why shouldn't I be using pairs in normal
> code?
> I want to do simple point-to-point (often asynchronous) messaging
> between many peers. The REQ/REP and PUB/SUB paradigms don't fit.
> Additionally I want to do dynamic resource discovery which concretely
> binding to a port negates.

You might consider putting a broker in between peers, that helps you
make a more dynamic topology.

PAIR/PAIR does not reconnect if either node breaks and comes back, and
it's exclusive, so the bound endpoint can accept exactly one
connection at a time.  This makes it a good pattern for inter-thread
signalling, for example, but not great for connecting more nodes.

Have you looked at XREQ/XREP?  They're not documented yet, only a
little in the guide, but that might be what you need.

Pieter Hintjens
iMatix - www.imatix.com

More information about the zeromq-dev mailing list