[zeromq-dev] Truncated publish messages

Pieter Hintjens ph at imatix.com
Fri Jan 30 19:36:48 CET 2015

Yes, you can override the global linger that CZMQ uses, either by API
call zsys_set_linger() or by this environment variable. The default is
zero, so immediate exit with no linger. In most cases we then handle
shutdown explicitly with handshaking between peers.

On Wed, Jan 28, 2015 at 10:35 PM, McMillan, Scott A
<scott.a.mcmillan at intel.com> wrote:
> On 1/28/15, 12:34 PM, "McMillan, Scott A" <scott.a.mcmillan at intel.com>
> wrote:
>>If I understand the documentation correctly, ZMQ_LINGER will not help
>>because the program itself exits.
> Sorry to respond to myself, but I may have just gotten confused by the
> documentation on linger.
> The zmq-setsockopt documentation says the default linger value is -1,
> meaning an infinite linger period.
> The czmq zsys documentation says the default linger value is 0
> (zsys_set_linger), meaning any pending messages will be dropped.
> I suppose the two statements are not necessarily in conflict, since one
> applies to ZMQ and the other to CZMQ.
> Anyway, I first read the zmq-setsockopt documentation, thought it was
> already using an infinite linger period, and concluded it wasn't an
> option.  However, I've actually found that setting ZSYS_LINGER=-1 solves
> my problem.
> But perhaps the documentation could be clarified on this point?
> Thanks,
> Scott
> _______________________________________________
> 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