Is your feature request related to a problem? Please describe.
I'm frustrated by the fact that FeignHttpClientProperties.maxConnectionsPerRoute parameter only works when using Apache HTTP Client but is completely ignored when using OkHttp client.
Describe the solution you'd like
I would like to see consistent configuration support for connection limits across both HTTP client implementations. The maxConnectionsPerRoute property (and ideally maxConnections) should be respected by the default OkHttp client configuration, just as it is for the Apache client.
Describe alternatives you've considered
I would like to see consistent configuration support for connection limits across both HTTP client implementations. Ideally, one of these solutions:
@Bean
public OkHttpClient.Builder okhttpClientBuilder(FeignHttpClientProperties httpClientProperties) {
Dispatcher dispatcher = new Dispatcher();
dispatcher.setMaxRequests(httpClientProperties.getMaxConnections());
dispatcher.setMaxRequestsPerHost(httpClientProperties.getMaxConnectionsPerRoute());
return new OkHttpClient.Builder()
.dispatcher(dispatcher);
}