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.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to