It depends. A pair socket will only ever have one peer at a time, as the doc says. So if the binding end gets a new peer trying to join before the other one was removed, it will ignore it.
https://github.com/zeromq/libzmq/blob/master/src/pair.cpp#L56 On Mon, 2018-06-18 at 13:10 +0200, Attila Magyari wrote: > @Esa, > > are these documents recent? I am currently using ZMQ_PAIR sockets and > they > do reconnect quite well. > > On Mon, Jun 18, 2018 at 1:05 PM Esa HekmatiZadeh <[email protected] > m> > wrote: > > > Hi James > > According to zguide: > > > > > When you want to coordinate a set of nodes on a network, PAIR > > > sockets > > > won't work well any more. This is one of the few areas where the > > > strategies > > > for threads and nodes are different. Principally, nodes come and > > > go whereas > > > threads are usually static. PAIR sockets do not automatically > > > reconnect if > > > the remote node goes away and comes back. > > > > > > > As I understand from the above quote; Thanks to these > > characteristics PAIR > > socket is more suitable for inproc environment where threads are > > statics > > however you can use PAIR sockets over TCP as long as you aware and > > accept > > the behavior of PAIR which does not reconnect. > > > > On Mon, Jun 18, 2018 at 3:31 PM, Attila Magyari <[email protected]> > > wrote: > > > > > As I understood, the documents are outdated, and ZMQ_PAIR is > > > supposed to > > > work not only for inproc protocols. I am definitely not sure > > > about this, > > > and I as well use it for TCP, so would be interested in the > > > answers. > > > > > > On Mon, Jun 18, 2018 at 12:40 PM James Harvey <[email protected] > > > m> > > > wrote: > > > > > > > Hi, > > > > > > > > > > > > > > > > I have been using ZMQ_PAIR recently for a one to one data feed > > > > over > > > > TCP. I know the documentation doesn’t explicitly say this > > > > should work > > > > (over TCP) but for the most part it does. Last week I came > > > > across a > > > > situation where the bind end of the connection had reconnection > > > > issues if > > > > no data is flowing during the bounce of the TCP connection. > > > > > > > > > > > > > > > > Before I go to the trouble of recreating/documenting the > > > > behavior (I > > > > won’t call it a bug at this point) I want to know if there is > > > > support in > > > > the zeromq community for ZMQ_PAIR to be supported over TCP? As > > > > far as I can > > > > tell the documentation doesn’t explicitly say either way. > > > > > > > > > > > > > > > > I know there are other patterns (PUB/SUB, PUSH/PULL) that > > > > support TCP > > > > but they are not as simple as the ZMQ_PAIR where you want a > > > > strict bi > > > > directional one to one relationship. > > > > > > > > > > > > > > > > If it’s the case that ZMQ_PAIR is only to be used over inproc > > > > then maybe > > > > the connect/bind should fail for anything other than inproc so > > > > people don’t > > > > make mistakes and assume it’s going to work. > > > > > > > > > > > > > > > > Thanks > > > > > > > > > > > > > > > > James > > > > _______________________________________________ > > > > zeromq-dev mailing list > > > > [email protected] > > > > https://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > > > > > > _______________________________________________ > > > zeromq-dev mailing list > > > [email protected] > > > https://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > > > > > > _______________________________________________ > > zeromq-dev mailing list > > [email protected] > > https://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > https://lists.zeromq.org/mailman/listinfo/zeromq-dev -- Kind regards, Luca Boccassi
signature.asc
Description: This is a digitally signed message part
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
