I'm using pyzmq 2.0.10 backed by zeromq-2.0.10 with the stock python 2.6.6 provided with Ubuntu 10.10 desktop 32-bit. The manpage for zmq_socket reads:
When a ZMQ_PUSH socket enters an exceptional state due to having
reached the high water mark for all downstream nodes, or if there
are no downstream nodes at all, then any zmq_send(3) operations on
the socket shall block until the exceptional state ends or at least
one downstream node becomes available for sending; messages are not
However, I'm not getting blocking behavior when I shut off my PULLer. This is for the case without HWM. I read the above to say that when there is no downstream node, my PUSHer should block. Instead, it keeps on queuing up messages, which it faithfully delivers upon starting/restarting the receiver.
Here are the test scripts:
If one uses bind on the push side, it works as advertised in the docs. This behaviour should be mentioned in the docs somewhere. The HWM works even when using connect on the push side.
Right. This is the consequence of the fact that queue is created immediately as zmq_connect is called. However, on the bind side the queue is created only when the peer connects. The documentation should explain this.
The documentation is correct in describing the intended behaviour.
I've created a new issue, 179, to make sure that we don't forget to fix the implementation at some point.