[zeromq-dev] [REP-REQ] Sockets timeouts and connection reset
Francesco
francesco.montorsi at gmail.com
Sat Apr 7 11:06:01 CEST 2018
Hi Victor,
2018-04-06 17:44 GMT+02:00 DUMAS, Victor <Victor.DUMAS at stago.com>:
> In order to not block forever each socket has sending and receiving
> timeouts. In case those timeouts are reached the sockets are destroyed and
> recreated.
>
this statement has triggered my attention: why would you do that ?
ZMQ sockets are meant to be long-lived objects from my understanding and if
something bad happens at networking level (somebody pulls off the cable)
they will automatically reconnect using ZMQ background threads once network
connectivity is restored... I think that in your scenario destroying the
sockets and recreating them is not really needed and does not really help:
just keep retrying or (if you're using TCP transport and you have timeouts
big enough) you can simply provide an error message of some kind (e.g.
network failure)...
Just my 2 cents,
Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20180407/1348396d/attachment.htm>
More information about the zeromq-dev
mailing list