dimas-b commented on code in PR #1913: URL: https://github.com/apache/polaris/pull/1913#discussion_r2159273930
########## runtime/service/src/main/java/org/apache/polaris/service/quarkus/config/QuarkusProducers.java: ########## @@ -170,6 +175,34 @@ public UserSecretsManagerFactory userSecretsManagerFactory( return userSecretsManagerFactories.select(Identifier.Literal.of(config.type())).get(); } + @Produces + @Singleton + @Identifier("http-client-s3") + public SdkHttpClient sdkHttpClient(S3AccessConfig config) { + ApacheHttpClient.Builder httpClient = ApacheHttpClient.builder(); + config.maxHttpConnections().ifPresent(httpClient::maxConnections); + config.readTimeout().ifPresent(httpClient::socketTimeout); + config.connectTimeout().ifPresent(httpClient::connectionTimeout); + config.connectionAcquisitionTimeout().ifPresent(httpClient::connectionAcquisitionTimeout); + config.connectionMaxIdleTime().ifPresent(httpClient::connectionMaxIdleTime); + config.connectionTimeToLive().ifPresent(httpClient::connectionTimeToLive); + config.expectContinueEnabled().ifPresent(httpClient::expectContinueEnabled); + return httpClient.build(); + } + + public void closeSdkHttpClient(@Disposes @Identifier("http-client-s3") SdkHttpClient client) { Review Comment: What do you mean by "out of place"? `QuarkusProducers` creates a singleton client, `QuarkusProducers` also closes that same client. Who would call `.close()` on the wrapper? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org