-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hello!
We are still experiencing Connection Reset issues with the Pooling Manager as it stands today. I was wondering if y'all would be able to make an update to allow us to be able to set custom max total and default routes per connection within the HttpClient constructor.
Here is an example.
public HttpClient(Map<String, Object> headers, int connectTimeoutSeconds, int readTimeoutSeconds, int totalMaxConnections, int defaultConnectionMaxPerRoute) {
this.headers = headers;
this.clientConfigBuilder = RequestConfig
.custom()
.setConnectTimeout(Timeout.ofSeconds(connectTimeoutSeconds))
.setConnectionRequestTimeout(Timeout.ofSeconds(connectTimeoutSeconds))
.setConnectionKeepAlive(Timeout.ofSeconds(connectTimeoutSeconds))
.setResponseTimeout(Timeout.ofSeconds(readTimeoutSeconds));
this.connectionManager = new PoolingHttpClientConnectionManager();
connectionManager.setMaxTotal(totalMaxConnections);
connectionManager.setDefaultMaxPerRoute(defaultConnectionMaxPerRoute);
this.client = HttpClients.custom().setConnectionManager(connectionManager).build();
}
Thanks!
Allan
Metadata
Metadata
Assignees
Labels
No labels