Open arjav-desai opened 1 year ago
Had a chance to explore this a bit more. There seems to be a way to configure the connector now, using a Config
object and a special property. This should work to set any property on the underlying WebClient used by the HelidonConnector
, including the keep alive setting. Here is sample code that shows how to do it:
Config config = Config.builder()
.addSource(MapConfigSource.create(Collections.singletonMap("keep-alive", "true")))
.build();
Client client = ClientBuilder.newBuilder()
.property("jersey.connector.helidon.config", config)
.build();
The config object will be used to configure the underlying WebClient
created by the connector.
Created #7640 for 4.x (PR #7641). Re-targeting this to 3.x.
Currently, we don't have doc/example about setting/configuring HelidonConnector.
When we look at https://github.com/helidon-io/helidon/blob/helidon-3.x/jersey/connector/src/main/java/io/helidon/jersey/connector/HelidonConnector.java, the connector has options for configuring followRedirects and readTimeout, but nothing to control keepAlive. HelidonConnector is based-on/used WebClient underneath which supports keepAliveWebClient but I don't see a way to turn that on through the connector.