> Have a look at ZMQ_LINGER option:

Thanks for the reply!

Sadly, this actually doesn't work and is the reason for the bug. I forgot to 
mention it in my email but did in the bug report.

The documentation for ZMQ_LINGER states:

The default value of -1 specifies an infinite linger period. Pending messages 
shall not be discarded after a call to zmq_close(); attempting to terminate the 
socket's context with zmq_term() shall block until all pending messages have 
been sent to a peer.

By default this is -1 and this is the documentation that is contrary to the 
behavior exhibited. I have explicitly setting ZMQ_LINGER to -1 and validated 
that it is set to -1 and still loose messages.

Martin commented on the bug:

"The problem is that the message that cannot be written to the pipe because of 
HWM is kept in the engine. If disconnection happens in such situation, engine 
is closed and the message is lost."

Example code (both mine and Martin's) is attached to the bug. I'm hoping there 
is a way around the bug.

Thanks!

>>>------>

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to