Yes it does work over TCP and it does attempt to reconnect when you restart the bind end.
In the background the zmq::tcp_connector attempts to make the reconnection. It does all the right things and ends up in zmq::tcp_connecter_t::out_event and calls the last line _socket->event_connected (_endpoint, fd); After this all looks good in terms of TCP, the connection is established BUT no messages flow. I have been looking through the code trying to work out why ZMQ_PAIR never supported reconnection. Is it related to the fact it was originally designed for inproc which doesn’t support reconnect? https://github.com/zeromq/libzmq/blob/6bfa91f13f73b67be47ded18986b76d154d5923b/src/socket_base.cpp#L685 It seems odd though as I use PUB/SUB/PUSH/PULL over inproc and TCP but those patterns are not excluded from reconnect just because they can be used over inproc. From: zeromq-dev <[email protected]> On Behalf Of vincent freedom Sent: 20 June 2018 04:48 To: [email protected] Subject: Re: [zeromq-dev] ZMQ_PAIR over TCP Nope, it doesn't reconnect. It looks like it does work over tcp though. https://pastebin.com/e42ysUAy https://pastebin.com/jbi1KA3n Run the client for the second time and it won't receive any messages. -vf
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
