Flushing ZMQ pipe before use?

From the ZMQ FAQ:

How can I flush all messages that are in the ZeroMQ socket queue? There is no explicit command for flushing a specific message or all messages from the message queue. You may set ZMQ_LINGER to 0 and close the socket to discard any unsent messages.

1 Like