Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HttpClient configuration for ConnectionPool using PoolingHttpClientConnectionManager
public PoolingHttpClientConnectionManager poolingConnectionManager() {
PoolingHttpClientConnectionManager poolingConnectionManager =
new PoolingHttpClientConnectionManager(getConnectionSocketFactoryRegistry());
poolingConnectionManager.setMaxTotal(MAX_CONNECTIONS);
poolingConnectionManager.setDefaultMaxPerRoute(MAX_PER_ROUTE_CONNECTION);
poolingConnectionManager.setValidateAfterInactivity(VALIDATE_AFTER_INACTIVITY_IN_MILLIS);
return poolingConnectionManager;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.