[zeromq-dev] ROUTER and queue overflow
Joel Lauener
Joel.Lauener at cern.ch
Fri Apr 5 10:13:33 CEST 2013
Currently I'm doing some testing with the DEALER-ROUTER combo. This test involve a single ROUTER sending messages to a single DEALER. This emulate one of our use case were the server is sending notifications to a client. What I'm doing now is I'm slowing down the client so it is unable to process all the received messages.
Looking at the TCP buffers I see a correct behaviour, client rcv buffer fills up, then server snd buffer fills up. However when the snd buffer is full, the ROUTER still accepts my messages but seems to internally drop them. I'm using non-blocking send with the mandatory option enabled, but still I receive no error. Is this the expected behaviour?
Is there some documentation (beside the code ;) about the internals of ROUTER sockets? I guess there is one "main" queue that is dispatched to many "client" queues. If so, this would explains why send doesn't fail because the "main" queue is not full and the message is dropped while dispatching. That would also explains why HWM doesn't work as I would expect (because it only affects the "main" queue).
Using a DEALER-DEALER pattern it works as expected. The send calls fail, which allows the server to be aware of the lost message. This last point is very important for us because if a notification is lost the server must, at least, log it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130405/f4120e6c/attachment.htm>
More information about the zeromq-dev
mailing list