[zeromq-dev] ZMQ_LINGER does not work for me.
Frank Hartmann
soundart at gmx.net
Fri Jul 19 08:30:45 CEST 2013
Hi,
I have a problem with ZMQ_LINGER:
The only case where it seems to work for me as expected is '0'.
If I set the linger value to -1, or any larger positive number (like
3000), send a large message (2 megabytes) and call zmq_close, then the
message is lost.
If I do the sequence send message, sleep(linger_time), zmq_close the message is
reaching its goal.
This seems to have been discussed several times in the past and I had
the impression from googling and mailing list reading that this was
fixed several times too, so I checked with yesterday
https://github.com/zeromq/libzmq and the problem is still there.
I think this look similar:
https://zeromq.jira.com/browse/LIBZMQ-551
Except he uses python, no idea if this is a wrapper around C, or an
independant implementation.
other maybe related JIRAs:
https://zeromq.jira.com/browse/LIBZMQ-264
https://zeromq.jira.com/browse/LIBZMQ-497
Details on my testcase:
* ROUTER socket, DEALER socket, problematic last message is send by DEALER
* happens on windows and linux
On the other hand I see discussions with respect to ZMQ_LINGER in some
corner cases https://zeromq.jira.com/browse/LIBZMQ-546 so maybe I am
doing something wrong, like using the wrong repro, building ZMQ wrong...
Is ZMQ_LINGER with linger value >0 used by you and does it work?
kind regards
Frank
More information about the zeromq-dev
mailing list