I'm trying to understand what is the difference between them. I tried to read the documentation but it does not help alot.
HttpClientBuilder
.create()
.setMaxConnPerRoute(maxConnectionsPerRoute)
.setMaxConnTotal(maxConnectionTotal)
.build();
It's the same of setDefaultMaxPerRoute and setMaxTotal from PoolingHttpClientConnectionManager:
final PoolingHttpClientConnectionManager poolingmgr = new PoolingHttpClientConnectionManager();
poolingmgr.setDefaultMaxPerRoute(max);
poolingmgr.setMaxTotal(2 * max);
setMaxConnTotal
is the total maximum connections available in the connection pool.
setMaxConnPerRoute
is the total number of connections limit to a single port or url.
Hope it is clear now
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With