Make apache5-client the default sync HTTP client#6732
Conversation
3ac9407 to
7d111aa
Compare
7d111aa to
501ee26
Compare
| "type": "feature", | ||
| "category": "AWS SDK for Java v2", | ||
| "contributor": "", | ||
| "description": "This update replaces the default `apache-client` runtime dependency of service clients with the new `apache5-client`. This means that service clients will now use the `Apache5HttClient` by default if no HTTP client is explicitly configured on the service client builder. The SDK version is also updates to `2.42.0` to reflect this change in default client." |
There was a problem hiding this comment.
note: version will be bumped before merging since releases done before then will cause merge conflicts.
|
|
|
Been waiting a long time on this. Are we any closer to merging this change? |
5c1544e to
a807c94
Compare
This commit swaps the default apache-client dependency of service modules with apache5-client. Applications just relying on the default HTTP client will now use `Apache5HttpClient` as a result.
Expect100ContinueHeaderTest tests 4.x specific behavior (default 100-continue).
…ror for customers using ApacheHttpClient in environments that bundle the whole SDK (e.g., EMR) after apache5-client default switch (#6964)
83ddb4a to
6cd3046
Compare
…#6974) * fix(dynamodb): Add TCP keep-alive permissions to SecurityManager test policy for Apache 5 compatibility. Apache 5.6 sets TCP_KEEPIDLE/INTERVAL/COUNT by default which requires jdk.net.NetworkPermission. * Fix ResponseInputStreamTimeoutIntegrationTest to update it to Apache5 exception assertion * Remove apache5-client test scope from s3/pom.xml to restore runtime transitivity. The test scope override prevented downstream modules like s3-transfer-manager from discovering the HTTP client via SPI * Dumy commit to trigger integ test * because we use org.apache.hc.core5.http.ConnectionRequestTimeoutException in ResponseInputStreamTimeoutIntegrationTest * Removing Apache5 specific execption from ResponseInputStreamTimeoutIntegrationTest and asserting just on error message * remove apache 5 as test dependency since it present as runtime
|
I was wondering if there should be a default 3rd party http client impl In my head it being explicit might help down stream compatibility. Take the example of https://github.com/awspring/spring-cloud-aws They have releases to spring boot so 4.0 is using 5.5 4.1 is 5.6 Also if there's a hard dependency on apache http 5 spring boot 4 etc might automatically configure using the apache libs, changing app behaviour My current thinking is that: In saying that the benefit of using apache http5 client by default is that is very performant out of the box; especially if on Java 25 using virtual threads. |





Motivation and Context
This commit swaps the default apache-client dependency of service modules with apache5-client. Applications just relying on the default HTTP client will now use
Apache5HttpClientas a result.Modifications
apache-clientwithapache5-clientApacheHttpClientdirectly2.42.0-SNAPSHOTTesting
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License