[zeromq-dev] Detecting sending failure due to over-full queue
Iñaki Baz Castillo
ibc at aliax.net
Tue Oct 5 15:52:32 CEST 2010
Hi, I need the client not to be blocked in zmq_send (REQ/XREQ) in case
the outgoing queue is over-full, so I expect I should use ZMQ_NOBLOCK
option. Also I just want a queue of maximun 5 messages, so I code:
int64_t queue = 5;
zmq_setsockopt (socket, ZMQ_HWM, &queue, sizeof queue);
int rc;
rc = zmq_send(socket, message, ZMQ_NOBLOCK);
Then if zmq_send returns EAGAIN I can know that the request couldn't
not be send, however I don't know hot to determine if it failed due to
over-full queue. How could I inspect the number of queues requests? or
how could I check whatever the queue has been overloaded?
Thanks a lot.
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the zeromq-dev
mailing list