title: ZeroMQ cleaning up PULL socket - half-close
body: <p>My problem is kind of trying to half-close a zmq socket.</p>
  
  <p>In simple terms I have a pair of PUSH/PULL sockets in Python.<br>
  The PUSH socket never stops sending, but the PULL socket should be able to clean itself up in a following way:</p>
  
  <ol>
  <li>Stop accepting any additional messages to the queue</li>
  <li>Process the messages still in the queue</li>
  <li>Close the socket etc.</li>
  </ol>
  
  <p>I don't want to affect the PUSH socket in any way, it can keep accumulating its own queue until another PULL socket comes around or that might be there already. The LINGER option doesn't seem to work with recv() (just with send()).</p>
  
  <p>One option might be to have a broker in between with the broker PUSH and receiver PULL HWM set to zero. Then the broker's PULL would accumulate the messages. However, I'd rather not do this. Is there any other way?</p>