[zeromq-dev] Notify send()er that they've hit the high water mark
Ian Barber
ian.barber at gmail.com
Mon Jul 9 22:29:19 CEST 2012
On Mon, Jul 9, 2012 at 9:24 PM, Edwin Amsler <
edwinamsler at thinkboxsoftware.com> wrote:
>
> Ideally, when a HWM condition happened, send() would return false, then
> I'd test EAGAIN so I could decide for myself whether I should drop the
> message, or retry later. With that kind of functionality, I could throttle
> back my producer algorithm so that I exactly meet the demand of ZeroMQ
> instead of overwhelming/starving it out.
>
>
This is pretty much how it works with most socket types - if you use the
ZMQ_NOBLOCK flag, you'll get the EAGAIN if you've hit HWM.
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/d30a445c/attachment.htm>
More information about the zeromq-dev
mailing list