[zeromq-dev] Detecting sending failure due to over-full queue
Pieter Hintjens
ph at imatix.com
Tue Oct 5 16:26:34 CEST 2010
Iñaki,
Could you explain your architecture? Are you using a queue device or not?
-Pieter
On Tue, Oct 5, 2010 at 3:52 PM, Iñaki Baz Castillo <ibc at aliax.net> wrote:
> 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?
-
Pieter Hintjens
iMatix - www.imatix.com
More information about the zeromq-dev
mailing list