Hi Gyorgy,

back-pressure is something very specific to your application. ZeroMQ itself
only implements blocking or dropping depending on the socket types you're
using.

To implement a credit-based flow have a look into the guide:
http://zguide.zeromq.org/page:all#Transferring-Files

//Kevin

Am Do., 14. Mai 2020 um 09:55 Uhr schrieb Gyorgy Szekely <
[email protected]>:

> Hi All,
>
> I have a message router that routes messages between different types of
> producers and consumers. Socket types are router (message router), dealer
> (producer, consumer). Currently if a consumer is not fast enough messages
> start to queue up (dealer input queue, router output queue), eventually the
> router starts to drop messages to avoid blocking.
>
> I would like to implement some kind of flow control. With plain TCP I can
> rely on the built-in flow control: write blocks if consumer is overloaded,
> and producers can be sanctioned by not reading their socket.
>
> With ZMQ router/dealer I can detect  if a consumer is slow by receiving
> EAGAIN on send, but as far as I understand I can't "slow down" a specific
> producer, because router socket does fair queuing. So I have to do
> application layer "stop sending" and "continue" messages and send them to
> specific producers...
>
> Is there any better way to do this? I would rather not reinvent the wheel,
> TCP already has a sophisticated mechanism for this.
>
> Regards,
>    Gyorgy Szekely
>
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to