discrepancy between observed PUSH blocking behavior and manpage for zmq_socket

Description

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
discarded.

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:

Environment

None

Activity

Show:
guidog
December 1, 2010, 5:58 AM

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.

Martin Sustrik
December 3, 2010, 9:53 PM

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.

Martin Lucina
March 18, 2011, 2:22 PM

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.

Assignee

Unassigned

Reporter

Nate75Sanders

Labels

None

Priority

Configure