This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final RequestConfig requestConfig = RequestConfig.custom() | |
.setConnectionRequestTimeout(100) | |
.setConnectTimeout(500) | |
.setSocketTimeout(1000) | |
.build(); | |
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) | |
.setMaxConnTotal(1000) | |
.setConnectionTimeToLive(30, MINUTES) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final RequestConfig requestConfig = RequestConfig.custom() | |
.setConnectionRequestTimeout(100) | |
.setConnectTimeout(500) | |
.setSocketTimeout(1000) | |
.build(); | |
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) | |
.setMaxConnTotal(1000) | |
.setConnectionTimeToLive(30, MINUTES) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final RequestConfig requestConfig = RequestConfig.custom() | |
.setConnectionRequestTimeout(100) | |
.setConnectTimeout(500) | |
.setSocketTimeout(1000) | |
.build(); | |
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) | |
.setMaxConnTotal(1000) | |
.setConnectionTimeToLive(30, MINUTES) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final RequestConfig requestConfig = RequestConfig.custom() | |
.setConnectionRequestTimeout(100) // <-- | |
.setConnectTimeout(500) // <-- | |
.setSocketTimeout(1000) // <-- | |
.build(); | |
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) | |
.setMaxConnTotal(1000) | |
.setConnectionTimeToLive(30, MINUTES) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) | |
.setMaxConnTotal(1000) | |
.setConnectionTimeToLive(30, MINUTES) | |
.setRetryHandler((IOException exception, int executionCount, HttpContext context) -> { | |
return executionCount <= 3; | |
}) | |
.setServiceUnavailableRetryStrategy(new DefaultServiceUnavailableRetryStrategy(3, 1)) // <-- | |
.build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) | |
.setMaxConnTotal(1000) | |
.setConnectionTimeToLive(30, MINUTES) | |
.setRetryHandler((IOException exception, int executionCount, HttpContext context) -> { // <-- | |
return executionCount <= 3; // <-- | |
}) // <-- | |
.build(); | |
final RestTemplate restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) | |
.setMaxConnTotal(1000) | |
.setConnectionTimeToLive(30, MINUTES) //<-- | |
.build(); | |
final RestTemplate restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpClients.custom().disableContentCompression().build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final HttpClient httpClient = HttpClients.custom() | |
.setMaxConnPerRoute(100) // <-- | |
.setMaxConnTotal(1000) // <-- | |
.build(); | |
final RestTemplate restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient)); |
NewerOlder