[zeromq-dev] High water mark notification for publisher
edwinamsler at thinkboxsoftware.com
Sat Sep 22 00:57:29 CEST 2012
I brought up this problem a few months back, but had to move onto more
pressing things at the time.
It was mentioned that under the hood, the PUB-SUB system had individual
outgoing queues, each with their own water mark counters. What happens
to a message when all queues are full? It would be ideal to know if the
message I pass in will be dropped by all queues due to the high water
mark. I don't think it was implemented then, but it would certainly
solve my particular problem of over-tasking the publishing side.
I have example code here:
The idea would be that if that ZeroMQ's publisher has no room in the
internal buffers, that I would be notified the message wasn't sent. In
the test application, I would then be able to wait before trying again.
This way the application code which publishes messages isn't creating
needless work which is secretly thrown away.
More information about the zeromq-dev