In a REQ/REP socket, if the socket send a request to a dead (disconnected) node the message isn’t delivered and stays in a message queue occupying memory. How can one clean these undelivered messages (let’s say, messages that are in the queue for more than 1 minute)?
Thanks!
You might want to set the optional parameter
ZMQ_LINGER:… for which a positive value will set a maximun time for message to be blocked in the queue.
See
http://api.zeromq.org/2-1-1:zmq-setsockopt