Azure / Azure/azure-sdk-for-java
[CosmosDB] Feature Request: Support Vert.x HTTP Client or Pluggable HTTP Client Implementation
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 2.2k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 178
Description
**Is your feature request related to a problem? Please describe.**
The Azure CosmosDB SDK currently hardcodes the use of reactor-netty HTTP client in its implementation (see ReactorNettyClient.java (https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java). This creates compatibility issues when using CosmosDB in environments like Quarkus/GraalVM native image, where Vert.x is the preferred HTTP client.
Current situation:
- azure-cosmos depends on azure-core-http-netty → reactor-netty
- The HTTP client implementation is not pluggable
- This differs from other Azure SDK components (Storage, Event Hubs, Key Vault, etc.) which support multiple HTTP client implementations
**Describe the solution you'd like**
Option 1 (preferred): support Vert.x HTTP Client
- Allow CosmosDB to use azure-core-http-vertx as an alternative HTTP client implementation
- This would align CosmosDB with other Azure SDK components and work seamlessly in Vert.x-based frameworks
Option 2: Make HTTP Client Implementation Pluggable
Similar to how other Azure SDK components work, allow users to choose between:
- azure-core-http-netty (reactor-netty, current default)
- azure-core-http-vertx (Vert.x)
- others
**Describe alternatives you've considered**
keep using reactor-netty exclusively is not really ideal I think because forces non-reactor frameworks to include reactor-netty and graalVM native image compatibility issues
**Additional context**
The Apache Camel Quarkus project is currently working to add native support for the camel-azure-cosmosdb component, but the hardcoded reactor-netty dependency is blocking this effort.
We've noticed that other Azure SDK components—including Storage, Event Hubs, Service Bus, and Key Vault—already work seamlessly in Quarkus native mode because they support azure-core-http-vertx as an alternative HTTP client implementation. Having CosmosDB support the same pluggable HTTP client pattern would enable it to integrate smoothly with these frameworks and provide a consistent experience across all Azure services in cloud-native Java applications.
issue reference: https://github.com/apache/camel-quarkus/issues/2648
**Information Checklist**
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- [x] Description Added
- [x] Expected solution specified
Contributor guide
Assessment
This issue has not been assessed yet.