[zeromq-dev] ZMQ_LINGER does not work for me.

Hunter, Robert Robert.Hunter-Rivera at netapp.com
Fri Jul 19 15:40:04 CEST 2013


I believe the unit is in milliseconds, so 3000 is 3 seconds.

regards,

-Robert

On Jul 19, 2013, at 2:31 AM, "Frank Hartmann" <soundart at gmx.net> wrote:

> 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
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list