I would like to limit the active concurrent connections to an upstream server when proxying requests using a DefaultHttpClient, preferably by setting a connection limit in its configuration.
Alternately, I could use the normal exchange methods on DefaultHttpClient (which presumably respect the configured limits) if the proxied request rewriting was extracted into a separate class for reusability.
Actual Behaviour
I tried enabling the client's connection pool and setting a limit, but during testing I found it wasn't being respected. Stepping though the code in a debugger, it seems that poolMap isn't accessed at all.
Steps To Reproduce
Configure a HttpClientConfiguration's connection pool to enable it and set a limit on the number of connections.
Expected Behavior
I would like to limit the active concurrent connections to an upstream server when proxying requests using a
DefaultHttpClient
, preferably by setting a connection limit in its configuration.Alternately, I could use the normal
exchange
methods onDefaultHttpClient
(which presumably respect the configured limits) if the proxied request rewriting was extracted into a separate class for reusability.Actual Behaviour
I tried enabling the client's connection pool and setting a limit, but during testing I found it wasn't being respected. Stepping though the code in a debugger, it seems that
poolMap
isn't accessed at all.Steps To Reproduce
Configure a HttpClientConfiguration's connection pool to enable it and set a limit on the number of connections.
Use that configuration to create a proxy client
Proxy requests through the client, and see more connections than the configured pool size.
Environment Information
Example Application
No response
Version
3.3.4