[zeromq-dev] PUB message HWM dropping policy

Al Grant algrant at acm.org
Wed Aug 8 13:33:17 CEST 2018


The docmentation of zmq_socket states:

"When a *ZMQ_PUB* socket enters an exceptional state due to having
reached the high water mark for a *subscriber*, then any messages
that would be sent to the *subscriber* in question shall instead be
dropped until the exceptional state ends."

I can see two diametrically opposite ways of reading that:

(a) the next message which would otherwise be sent from ZMQ
queue to the subscriber, will be dropped until the exceptional
state is resolved - i.e. messages will be dropped _oldest_ first

(b) messages which the user sends to the ZMQ queue e.g. using
zmq_send will be ignored until the exceptional state is resolved -
i.e. messages will be dropped _newest_ first

Could this be clarified? In my current application I want the
"oldest first" behavior. I want to be able to call zmq_send
and never block, and if necessary have ZMQ drop messages
oldest first in order not to block. But I'm not confident I can
read enough formal specification of behavior into the docs to
rely on it.

(I know about ZMQ_CONFLATE but I need to handle overflow
on the sender side too.)

Also, the categorization of message loss at

http://zguide.zeromq.org/py:all#Missing-Message-Problem-Solver

doesn't mention HWM-related dropping at all. It surely ought to cover the
cases when messages are dropped for overflow reasons.

Thanks

Al
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20180808/51010224/attachment.html>


More information about the zeromq-dev mailing list