I'm working on an embedded application that uses ZeroMQ to communicate between 
software components.  I'm trying to figure out how to detect certain types of 
failure modes on the sender/transport side.  Here's my scenario:

 *   Two TCP sockets, A is a push socket, B is a pull socket
 *   A tries to send a message to B using zmq_sendmsg(socket, msg, ZMQ_DONTWAIT)

My questions are:

 1.  If A's ZMQ socket cannot accept the message because queues/buffers are 
full or high watermarks are exceeded, will A know right away due to an error 
code?  I.e., EAGAIN?
 2.  If A's ZMQ socket accepts the message but is only able to partially send 
the message due to an unreliable connection to B, and the message is discarded 
due to expiration of ZMQ_SNDTIMEO or ZMQ_LINGER, is there any way for A to 
know?  I.e. a callback of some sort?  If this doesn't exist, how hard would it 
be to hack in, and where would you start?
 3.  When using zmq_poll and non-blocking I/O, is there a way to determine if 
send errors have occurred on a set of sockets?
 4.  Do the above answers change if using ipc:// instead of tcp:// ?

I'm mainly concerned with determining whether data transport to the endpoint 
was successful.  This is a a lot more complexity that could be discussed here, 
but this seems like a good starting point.

Thanks very much for your guidance.

-Marc

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to