[zeromq-dev] Clarification of ZMQ_XPUB_NODROP
Sean Morris
mr.sean.morris at gmail.com
Tue Feb 18 21:48:21 CET 2020
Hello,
I'm looking for some clarification on how the ZMQ_XPUB_NODROP socket option
is supposed to work with multi-part messages.
The documentation says the following :
ZMQ_XPUB_NODROP: do not silently drop messages if SENDHWM is reached
Sets the *XPUB* socket behaviour to return error EAGAIN if SENDHWM is
reached and the message could not be send.
A value of 0 is the default and drops the message silently when the peers
SNDHWM is reached. A value of 1 returns an *EAGAIN* error code if the
SNDHWM is reached and ZMQ_DONTWAIT was used.
My observations indicate that when using this socket option with multi-part
messages, it seems that if I don't continually try to resend the message
part that returned EAGAIN, it's possible that part, but not all, of a
multi-part message may be transmitted, which seems to violate the guarantee
that peers will receive all parts of a message, or none at all.
My question is, what is the correct behaviour when using this socket
option? Should users try to send failed the message part forever until it
succeeds (or fails with a different errno set)? If so, I think the
documentation here could be a bit clearer about that. If that is not the
intended behaviour, I can try to create a minimal reproducer that
illustrates this problem, and file a formal bug.
thanks!
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20200218/2aad35ca/attachment.htm>
More information about the zeromq-dev
mailing list