[zeromq-dev] Dealing with client-side crash for REQ/REP
Bruno D. Rodrigues
bruno.rodrigues at litux.org
Wed Jan 8 00:20:21 CET 2014
Straight from the sockets documentation, Router won’t ever block and will either discard the message if nothing is connected, or queue up to the HWM (and then drop) if there is a connection. This applies to Router and PUB. It’s a little bit more complicated than this (queue vs. plain drop) if it’s on the bind or the connect side, but the point is that they get dropped and never block.
The other sockets (DEALER, etc) will block when the HWM fills up. Again depending on who binds or connects there’s a case where messages will be dropped if nothing is connected, but there is now an option ZMQ_IMMEDIATE (some other name on v3?) that will make the socket block if no connection exists.
http://api.zeromq.org/4-0:zmq-setsockopt
http://api.zeromq.org/4-0:zmq-socket
On Jan 7, 2014, at 23:10, Michi Henning <michi at triodia.com> wrote:
> In essence, I want to make sure that my router/dealer doesn't block, and that any replies
> that cannot be returned to clients because of a client crash are discarded on the server
> side.
>
> Thanks,
>
> Michi.
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140107/d1cee919/attachment.sig>
More information about the zeromq-dev
mailing list