ZMQ prevent sending "timedout" messages

I wonder how can I "abort" a message after it has not been sent for sometime.

The scenario is simple: 1) Client connects to server 2) The server goes down 3) client send a message, there's no issue here as Zmq queues the message locally (so the "send" operation is successful) 4) Assume I've set RCVTIMEO I get the timeout 5) After I got the timeout I no longer wish to send the message, but once the server goes up again Zmq will transmit the message. How can I prevent it?

The reason I want to prevent this is because once I got the timeout I responded back to my customer with failure message (e.g "the request could not be processed due to timeout"), and it would be a real issue if eventually his request would get transmitted and processed...

Hope my question is clear... Thx!

Step 1 ) set aClientSOCKET instance ZMQ_LINGER parameter not to spend any time to re-send any en-queued messages during the forthcoming socket dismantling operations ( which is fairly in-line with the modern high-performance / low-latency distributed messaging systems design -- things go wrong, quite often go wrong, so work with this as a matter of fact rather than lose time fighting against un-avoidable ... )

and

Step 2 ) force the .close() to discard the socket

and

Step 3 ) if needed, re-instate another socket / communication means or use another a-priori-prepared means ( alike the binary-star fault-resilient shading ) to resolve the intended application processing after the situation the { "primary" | "observed" }-connection-peer handshaking time-out-ed.