code: private CloseableHttpClient createHttpClient(HttpClientConnectionManager connectionManager) {
          HttpClientBuilder builder =
                  HttpClients.custom().setConnectionManager(connectionManager).disableAutomaticRetries();
  
          int socketBufferSizeInBytes = this.config.getSocketBufferSizeInBytes();
          if (socketBufferSizeInBytes > 0) {
              builder.setDefaultConnectionConfig(
                      ConnectionConfig.custom().setBufferSize(socketBufferSizeInBytes).build());
          }
  
          return builder.build();
      }
docs: Create http client based on connection manager.
  
  @param connectionManager The connection manager setting http client.
  @return Http client based on connection manager.