code: private CloseableHttpAsyncClient createClient(HttpSettings settings, ApacheHttpClientConfiguration conf) {
          IOReactorConfig ioReactor = IOReactorConfig.custom().setIoThreadCount(conf.getMaxThreadCount()).build();
          HttpAsyncClientBuilder httpClientBuilder = HttpAsyncClients.custom()
                  .useSystemProperties()
                          // allow POST redirects
                  .setRedirectStrategy(new LaxRedirectStrategy()).setMaxConnTotal(conf.getMaxTotalConnectionCount()).setMaxConnPerRoute(conf.getMaxRouteConnectionCount()).setDefaultIOReactorConfig(ioReactor)
                  .setKeepAliveStrategy(new DefaultConnectionKeepAliveStrategy()).setDefaultRequestConfig(createDefaultRequestConfig(settings));
          if (settings.getProxyUrl() != null) {
              DefaultProxyRoutePlanner routePlanner = createProxyRoutePlanner(settings, httpClientBuilder);
              httpClientBuilder.setRoutePlanner(routePlanner);
          }
          CloseableHttpAsyncClient httpClient = httpClientBuilder.build();
          httpClient.start();
          return httpClient;
      }
docs: Creates asynchronous Apache HTTP client.
  
  @param settings
  settings to use to create client.
  @param conf
  configuration related to async connection.
  @return Instance of {@link CloseableHttpAsyncClient}.