mpenet/jet

investigate flow control/back pressure solutions

Closed this issue · 0 comments

The problem is that channels are backed by a pending queue for 1024 puts (core.async default). In the case a consumer cannot keep up messages will drop. We cannot use blocking puts as this will block other clients since threads/requests are not 1:1.

We could have a configurable buffer size and types on the in/out channels, possibly with higher defaults. This would allow the user to have a (very) large in/out queue, or having control of it's size at the cost of dropping messages.

Also it's possible that jetty9 has mechanism to handle that internally, I didn't take the time to look into this in detail just yet.

Feel free to suggest alternatives