On Fri, Aug 19, 2011 at 5:21 PM, Bernt Habermeier <[email protected]>wrote:
> To be clear, the option I would want is to be able to set a socket option > (or something like that) that indicates: > > - If we hit HWM condition, drop data > - If we have data at process exit, drop data. > > Alternatively, if I can query the queue length of messages that are unsent > from the API, instead of blindly adding the event to be sent over the > socket, I could drop it before it ever hits ZMQ. Does this exist? Of > course, I'd still have to have the ability to "drain the data" to be sent > out at process exit -- I don't want the process to hang / wait indefinitely. > > > I think you have the tools you need in the API - look at the ZMQ_LINGER sockopt for termination, and for sending data you can either use send with the flag ZMQ_NOBLOCK to guarantee no blocking, or poll the socket first to see whether a message would block on send. Ian
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
