Open harpocrates opened 3 years ago
I agree that is awkward.
In fact, both the power of two requirement and any dependency between an max-connections
and max-open-requests
is not really warranted any more.
I guess the easiest solution for newHostConnectionPool
and cachedHostConnectionPool
would be to actually implement parts of #2120, i.e. providing an actual streaming interface without the current clutch which uses a mixture of mapAsyncUnordered
and explicit buffers to provide backpressure. The current solution can lead to issues like this one, where the buffers in mapAsyncUnordered
and the PoolInterface
might not quite agree on the current state.
When using the streaming connection pool client API, I usually don't care much about
max-open-requests
sincemax-connections
is going to be the determining factor for the number of concurrent connections. However,max-open-requests
still has to be set to a number that is greater thanmax-connections
. Combined with the fact thatmax-open-requests
has to be a power of two, the configuration ends up being a little unintuitive.I wish the following would work instead of throwing a
BufferOverflowException
:Instead, to make this not throw, I have to change the
withMaxOpenRequests
to