[zeromq-dev] get socket condition
Goswin von Brederlow
goswin-v-b at web.de
Mon Aug 11 11:36:33 CEST 2014
On Mon, Aug 11, 2014 at 05:10:11PM +0800, bino oetomo wrote:
> Dear all ...
> Let's say I (using python) have simple :
> ctx = zmq.Context()
> socket.setsockopt(zmq.SNDHWM, 10)
> I knew that when HWM reach, I'll get EAGAIN exception.
> But, is there any posibilities that a socket is accidently/silenty
> crash/dead ?
> If so ... what is the error code ?
> Is there any docs that explain zmq.ZMQError ? I mean :
> - What error code (int)
> - What error name
> - Meaning of the error, or what caused the error ?
There are lots of ways the underlying tcp socket can die. But zeromq
will reconnect the socket again and again and again.
Only problem is that you can loose messages when it dies with messages
in flight. Zeromq has reliable delivery (if a message arrives then it
is all of a message), not garanteed delivery.
More information about the zeromq-dev