[zeromq-dev] Unreasonable behavior of a socket when connection can't be established. How to enable the blocking mode on a socket?
Bill Torpey
wallstprog at gmail.com
Fri Sep 30 14:03:34 CET 2022
Hi Yuri:
You should open an issue on Github if you want to take this any further, and include complete code that others can use to attempt to duplicate your issue.
As Jake points out, there are other issues with REQ/RESP sockets that may be causing problems for you. I can’t address those, not having any experience with them.
I can say that these options have been tested extensively in the process of rolling out the code to our live production system(s), and at least with PUB/SUB sockets, appear to work properly.
Regards,
Bill
> On Sep 30, 2022, at 3:06 AM, Yuri <yuri at rawbw.com> wrote:
>
> On 9/28/22 07:20, Bill Torpey wrote:
>>
>> 1. You can set options on the socket to change ZMQ’s default reconnection algorithm:
>>
>> ZMQ_RECONNECT_STOP_CONN_REFUSED
>> ZMQ_RECONNECT_STOP_HANDSHAKE_FAILED
>> ZMQ_RECONNECT_STOP_AFTER_DISCONNECT
>>
>
> I tried to set the first option on the REQ socket:
>
> > setsockopt(zmq.RECONNECT_STOP, 1) # zmq.RECONNECT_STOP_CONN_REFUSED
>
> but it still doesn't fail on 'Connection Refused' event.
>
>
>
> Yuri
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20220930/84a01e8f/attachment.htm>
More information about the zeromq-dev
mailing list