.withMaxConnections(maxConnections)
.withIdleConnectionsTimeoutMillis(idleTimeout)
.config(clientConfig)
.enableWireLogging(LogLevel.DEBUG)
.pipelineConfigurator(configurator).build();
stateChangeListener = new TrackableMetricEventsListener();
client.subscribe(stateChangeListener);
stats = new PoolStats();
client.subscribe(stats);
return client;
}