Azure Cosmos DB Java SDK v4 for Core (SQL) API: release notes and resources
The Azure Cosmos DB Java SDK v4 for Core (SQL) combines an Async API and a Sync API into one Maven artifact. The v4 SDK brings enhanced performance, new API features, and Async support based on Project Reactor and the Netty library. Users can expect improved performance with Azure Cosmos DB Java SDK v4 versus the Azure Cosmos DB Async Java SDK v2 and the Azure Cosmos DB Sync Java SDK v2.
These Release Notes are for Azure Cosmos DB Java SDK v4 only. If you are currently using an older version than v4, see the Migrate to Azure Cosmos DB Java SDK v4 guide for help upgrading to v4.
Here are three steps to get going fast!
- Install the minimum supported Java runtime, JDK 8 so you can use the SDK.
- Work through the Quickstart Guide for Azure Cosmos DB Java SDK v4 which gets you access to the Maven artifact and walks through basic Azure Cosmos DB requests.
- Read the Azure Cosmos DB Java SDK v4 performance tips and troubleshooting guides to optimize the SDK for your application.
The Azure Cosmos DB workshops and labs are another great resource for learning how to use Azure Cosmos DB Java SDK v4!
|API documentation||Java API reference documentation|
|Contribute to SDK||Azure SDK for Java Central Repo on GitHub|
|Get started||Quickstart: Build a Java app to manage Azure Cosmos DB SQL API data · GitHub repo with quickstart code|
|Basic code samples||Azure Cosmos DB: Java examples for the SQL API · GitHub repo with sample code|
|Console app with Change Feed||Change feed - Java SDK v4 sample · GitHub repo with sample code|
|Web app sample||Build a web app with Java SDK v4 · GitHub repo with sample code|
|Performance tips||Performance tips for Java SDK v4|
|Troubleshooting||Troubleshoot Java SDK v4|
|Migrate to v4 from an older SDK||Migrate to Java V4 SDK|
|Minimum supported runtime||JDK 8|
|Azure Cosmos DB workshops and labs||Cosmos DB workshops home page|
- Updated reactor-core library version to
- Updated reactor-netty library version to
- Updated netty library version to
- Added new overload APIs for
- Added open telemetry tracing support.
Key Bug Fixes
- Fixed issue where SSLException gets thrown in case of cancellation of requests in GATEWAY mode.
- Fixed resource throttle retry policy on stored procedures execution.
- Fixed issue where SDK hangs in log level DEBUG mode.
- Fixed periodic spikes in latency in Direct mode.
- Fixed high client initialization time issue.
- Fixed http proxy bug when customizing client with direct mode and gateway mode.
- Fixed potential NPE in users passes null options.
- Added timeUnit to
requestLatencyin diagnostics string.
- Removed duplicate uri string from diagnostics string.
- Fixed diagnostics string in proper JSON format for point operations.
- Fixed issue with
.single()operator causing the reactor chain to blow up in case of Not Found exception.
- Added script logging enabled API to
idleEndpointTimeoutto 1h and default
Key Bug Fixes
- Fixed issue where
responseContinuationTokenLimitInKbget and set APIs in
- Fixed issue in query and change feed when recreating the collection with same name.
- Fixed issue with top query throwing ClassCastException.
- Fixed issue with order by query throwing NullPointerException.
- Fixed issue in handling of cancelled requests in direct mode causing reactor
- Added support for
- Increased the default value of maxConnectionsPerEndpoint to 130 in DirectConnectionConfig.
- Increased the default value of maxRequestsPerConnection to 30 in DirectConnectionConfig.
Key Bug Fixes
- Fixed issues with order by query returning duplicate results when resuming by using continuation token.
- Fixed issues with value query returning null values for nested object.
- Fixed null pointer exception on request manager in RntbdClientChannelPool.
ChangeFeedProcessorBuilderto builder pattern.
CosmosPermissionPropertieswith new container name and child resources APIs.
- Added more samples & enriched docs to
CosmosContainerAPIs with throughputProperties for autoscale/autopilot support.
- Merged all
CosmosResponsetypes to a single
jacksondependency from azure-cosmos & relying on azure-core.
- Updated SDK to use
Instanttype instead of
- Added new enum type
- Updated new line character in
Diagnosticsto System new line character.
readAll*APIs, use query select all APIs instead.
ChangeFeedProcessorestimate lag API.
- Added autoscale/autopilot throughput provisioning support to SDK.
ConnectionPolicywith new connection configs. Exposed
CosmosClientBuilderfor Direct & Gateway mode connection configurations.
Resourceto implementation package.
contentResponseOnWriteEnabledAPI to CosmosClientBuilder which disables full response content on write operations.
getETag()APIs on response types.
reactor-nettyto 0.9.7.RELEASE &
nettyto 4.1.49.Final versions.
- Added support for
CosmosPermissionPropertieson public surface for
SqlParameterListtype & replaced with
- Fixed multiple memory leaks in Direct TCP client.
- Added support for
- Removed external dependencies on
fasterxml.uuid, guava, commons-io, commons-collection4, commons-text.
- Updated netty to 4.1.45.Final & project reactor to 3.3.3 version.
- Updated public rest contracts to
- Added support for advanced Diagnostics for point operations.
- Updated package to
modelspackage for model / rest contracts
- Updated public APIs to use
Durationacross the SDK.
- Added all rest contracts to
CosmosPagedIterablepagination types for query APIs.
- Added support for sharing TransportClient across multiple instances of CosmosClients using a new API in the
- Query Optimizations by removing double serialization / deserialization.
- Response Headers optimizations by removing unnecessary copying back and forth.
ByteBufferserialization / deserialization by removing intermediate String instantiations.
Key Bug Fixes
- Fixed ConnectionPolicy
toString()Null Pointer Exception.
- Fixed issue with parsing of query results in case of Value order by queries.
- Fixed socket leak issues with Direct TCP client.
orderByQuerywith continuation token bug.
ChangeFeedProcessorbug fix for handling partition splits & when partition not found.
ChangeFeedProcessorbug fix when synchronizing lease updates across different threads.
- Fixed race condition causing
ArrayIndexOutOfBoundexception in StoreReader
1. How will customers be notified of the retiring SDK?
Microsoft will provide 12 month advance notification to the end of support of the retiring SDK in order to facilitate a smooth transition to a supported SDK. Further, customers will be notified through various communication channels – Azure Management Portal, Developer Center, blog post, and direct communication to assigned service administrators.
2. Can customers author applications using a "to-be" retired Azure Cosmos DB SDK during the 12 month period?
Yes, customers will have full access to author, deploy and modify applications using the "to-be" retired Azure Cosmos DB SDK during the 12 month grace period. During the 12 month grace period, customers are advised to migrate to a newer supported version of Azure Cosmos DB SDK as appropriate.
3. Can customers author and modify applications using a retired Azure Cosmos DB SDK after the 12 month notification period?
After the 12 month notification period, the SDK will be retired. Any access to Azure Cosmos DB by an applications using a retired SDK will not be permitted by the Azure Cosmos DB platform. Further, Microsoft will not provide customer support on the retired SDK.
4. What happens to Customer’s running applications that are using unsupported Azure Cosmos DB SDK version?
Any attempts made to connect to the Azure Cosmos DB service with a retired SDK version will be rejected.
5. Will new features and functionality be applied to all non-retired SDKs?
New features and functionality will only be added to new versions. If you are using an old, non-retired, version of the SDK your requests to Azure Cosmos DB will still function as previous but you will not have access to any new capabilities.
6. What should I do if I cannot update my application before a cut-off date?
We recommend that you upgrade to the latest SDK as early as possible. Once an SDK has been tagged for retirement you will have 12 months to update your application. If, for whatever reason, you cannot complete your application update within this timeframe then please contact the Cosmos DB Team and request their assistance before the cutoff date.
To learn more about Cosmos DB, see Microsoft Azure Cosmos DB service page.