Skip to content

Instantly share code, notes, and snippets.

@marciorodrigues87
Last active July 6, 2017 02:15
Show Gist options
  • Save marciorodrigues87/3a724d281c6d480a151278545bc7c405 to your computer and use it in GitHub Desktop.
Save marciorodrigues87/3a724d281c6d480a151278545bc7c405 to your computer and use it in GitHub Desktop.
RestTemplateConfigStepOne.java
final HttpClient httpClient = HttpClients.custom()
.setMaxConnPerRoute(100) // <--
.setMaxConnTotal(1000) // <--
.build();
final RestTemplate restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment