title: Howto make zeromq PUB/SUB drop old messages instead of new (for realtime feeds)?
body: <p>Say I have a <strong><code>PUB</code></strong> server that <strong><code>zmq_send()</code></strong>'s realtime messages to <strong><code>SUB</code></strong> client. If client is busy and can not <strong><code>zmq_recv()</code></strong> messages quick enough, then messages will be buffered in client (and/or server).</p>
  
  <p>If the buffer grows too large (high water mark) then NEW messages will be dropped. For realtime messages this is the opposite of what one wants. OLD messages should be dropped to make place for NEW ones.</p>
  
  <p>Is there some way to do this?</p>
  
  <p>Ideally I would like the <code>SUB</code> client's receive queue to be either empty or contain the most recent message only. When a new message is received it would replace the old one. ( I guess the problem here would be that the client would block on <code>zmq_recv()</code> when the queue is empty, wasting time doing so. )</p>
  
  <p>So how are realtime feeds usually implemented in <code>ZeroMQ</code>?</p>