singleton httpclient

Jim Fox fox at washington.edu
Mon Nov 18 16:10:40 EST 2019



>> I'm curious why the HttpClient (v3.4) is implemented as a
>> singleton, rather than, say, from a PoolingHttpClientConnectionManager.
>
> Brent would know better than I, but I don't think it is. We don't install our own ConnectionManager from what I can see, which means it auto-installs a PoolingHttpClientConnectionManager, and that's why the builder we have exposes properties like max connections and max per-route.
>
> It's all a bit spaghetti, but that's how it read to me. I think I've tested that in the past and certainly seen it operate multiple connections at a time.
>

If there is a PoolingHttpClientConnectionManager somewhere on that plate of spaghetti, how do I control the min and max connection limits?

Jim


More information about the dev mailing list