Skip to content

Releases: mongodb/mongo-java-driver

Java Driver 5.7.0-beta0 (January 16, 2026)

19 Jan 16:06

Choose a tag to compare

What’s Changed 🚀

New Features

  • Add auto-embedding support as part of vector search APIs #1862

Credential Handling

  • Handle unexpected end-of-stream errors from KMS #1849
  • Encryption client now uses writeConcern majority #1858

Performance Optimizations

  • Reuse ConnectionSource to avoid extra server selection #1813

Resource Management

  • Implement NettyByteBuf.asReadOnly and improve buffer duplication #1841

Compatibility and Maintenance

  • Update DEFAULT_ALLOWED_HOSTS to include *.mongo.com #1843
  • Update specifications submodule to latest (tests temporarily disabled) #1851
  • Remove unused JsonPoweredCrudTestHelper #1838

Benchmarks and Testing

  • Add new prose test coverage for transactions #1824
  • Improve GridFSObservableSpec cleanup when unsubscribing #1834
  • Support optional nModified field in bulk write responses #1823

Bug Fixes and Stability

  • Fix server selection flaky tests and update thresholds #1847
  • Fix flaky test related to API version handling (JAVA-6016) #1845
  • Remove assertion for verbose result due to SERVER-113344 #1835
  • Align log level to warning when removing server from cluster #1853

Documentation and Quality of Life

  • Update reactive streams MongoCollection JavaDoc to return empty Publisher instead of null #1840

Infrastructure Improvements

  • Evergreen git clone depth set to 1 for faster builds #1851

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/current/security/validate-signatures/#std-label-java-validate-signatures for the full procedure.

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Full Changelog: r5.4.0-alpha0...r5.7.0-beta0

Java Driver 5.6.2 (December 08, 2025)

08 Dec 15:09

Choose a tag to compare

What's Changed

Full Changelog: r5.6.1...r5.6.2

Java Driver 5.6.1 (October 06, 2025)

08 Dec 21:22

Choose a tag to compare

Java Driver 5.5.2 (October 06, 2025)

08 Dec 21:22

Choose a tag to compare

What's Changed

  • Merge changes from tls-channel to prevent accidentally calling SSLEng… by @vbabanin in #1737
  • Added nexus-publish plugin by @rozza in #1751

Full Changelog: r5.5.1...r5.5.2

Java Driver 5.6.0 (September 11, 2025)

12 Sep 17:16

Choose a tag to compare

What's Changed 🚀

Credential Handling

  • Fix OIDC reauthentication when a session is involved #1719
  • Add X509 authentication tests #1771
  • Fix OIDC tests #1753
  • Add CSOT to OIDC #1741

Performance Optimizations

  • Clear CommandCursorResult.results after next()/tryNext() #1780
  • Ignore maxWaitTime when CSOT is enabled #1744
  • Simplify Operations by uniting Sync and Async operations #1776

Resource Management

  • Fix Netty reference leak #1762
  • Properly handle exceptions in threads created by MongoClient #1764
  • Propagate timeout errors to callback #1761
  • Merge changes from tls-channel to prevent accidentally calling SSLEngine #1726

Compatibility and Maintenance

  • Handle dropIndex behavior change #1785
  • Remove Legacy based ClientSideEncryptionTests #1799
  • Remove code that won't execute on supported server releases #1704
  • Simplify tests based on 4.2 minimum server support #1712
  • Update libmongocrypt version to 1.14.1 #1778
  • Deprecate MongoNamespace#COMMAND_COLLECTION_NAME #1786
  • Remove internal use of MongoNamespace.COMMAND_COLLECTION_NAME #1782

Benchmarks and Testing

  • Support text indexes with encryption #1797
  • Ensure encrypted fields data exists fully #1802
  • CSFLE auto encryption tests improvements #1788
  • Normalize async and sync ClientSideOperationTimeoutProseTest #1800
  • Add prose test to verify server monitors do not gossip cluster time #1766
  • Added logging specification tests #1740
  • Include submodules to OIDC testing #1703

Bug Fixes and Stability

  • Fix duplicate field name serialization with @BsonDiscriminator and getter #1610
  • Fix Scala UnifiedTest import (No PR link)
  • Temporarily limit TypeMqlValuesFunctionalTest.asString server version #1803
  • Fix parameterized test names in CrudProseTest #1775
  • Improve MongoTimeoutException thrown by DefaultConnectionPool #1767
  • Improve error message clarity in MongoCommandException #1789
  • Ensure socks5 proxy option parsing is to specification #1688

Documentation and Quality of Life

  • Update README.md #1716
  • Add JavaDoc to NamespaceType #1754
  • Include error messages for stale primary #1714
  • Added operation (aka command name) to structured logging #1758

Kotlin Improvements

  • JAVA-3815: Pojo Codec - Detect property models on extended interfaces #563
  • Ensure custom KProperty include the name in the hashcode #1710

Test Enhancements

  • Add support for awaiting CommandStartedEvent in Unified Test Runner #1790
  • Update specifications and skip optional rawData based tests #1772
  • Improve test clarity and execution time #1743
  • Fix datalake and k8s test failures #1720
  • Improve Netty test variants #1721

Infrastructure Improvements

  • Automate closing and releasing maven artifacts when publishing #1757
  • Auto close the repository on publish #1755
  • Update waiting times for the transition stage #1756
  • Update the evergreen build to use the AWS secrets manager (No PR link)
  • Evergreen added shell script to create a git archive #1718
  • Add CODEOWNERS file #1739
  • Github action fix echo'd file name #1804

All Other Changes

  • Add Client Metadata Update Support #1708
  • Add namespace type support to ChangeStreamDocument #1736
  • Simplify RequestMessage class hierarchy #1787
  • Remove unused OperationTypeCodec #1746
  • Use OperationContext with NOOP Session #1733
  • Publish ClusterDescriptionChangedEvent on topology close #1738
  • Ensure serverHeartbeatEvent is sent before opening a connection #1715
  • Update the DEFAULT_CODEC_REGISTRY order #1795
  • Add parameter type in reflect-config.json for ChangeStreamDocument #1759
  • Added ClientEncryption methods to scala #1779
  • Modify a redundant code for CAPIHelper #1653
  • sunset Astrolabe #1769
  • Multiple build dependency updates #1801, #1794, #1783, #1773, #1763, #1748, #1735, #1724, #1713, #1711, #1698
  • Various version bumps and snapshot updates (Multiple commits without PR links)
  • Various CI/CD and infrastructure adjustments (Multiple commits without PR links)

New Contributors

New Contributors

Full Changelog: r5.5.1...r5.6.0

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.4/security/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.5.1 (June 06, 2025)

09 Jun 13:17

Choose a tag to compare

What's Changed

  • Fixed an issue where OIDC reauthentication failed when sessions were involved (#1725).
  • Ensured custom KProperty implementations correctly include property names in their hashcode calculations (#1731).
  • Resolved failures in datalake and Kubernetes integration tests (#1732).
  • Updated to use OperationContext with a NOOP session for improved consistency (#1734).

Full Changelog: r5.5.0...r5.5.1

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.5/security/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.5.0 (May 07, 2025)

07 May 16:21

Choose a tag to compare

What's Changed

🚀 New Features and Improvements

  • Credential Handling:

    • Added option to configure Data Encryption Key (DEK) cache lifetime (#1689).
  • Performance Optimizations:

    • Enhanced BSON codec lookup (#1632).
    • Optimized BSON decoding (#1667).
    • Reduced temporary buffer allocations during BSON serialization (#1628).
    • Optimized numeric value writing (#1635).
    • Improved String write and length computations (#1651, #1685).
    • Enhanced buffer handling to avoid direct list access (#1675).
    • Replaced Stack with ArrayDeque for better performance (#1681).
  • Resource Management:

    • Fixed Netty event loop resource leak on MongoClient close (#1646).
    • Added connection timeout to TLS Channel (#1686).
  • Compatibility and Maintenance:

    • Dropped support for MongoDB 4.0 (#1663).
    • Updated AWS SDK dependencies to the latest versions (#1639).
    • Replaced org.jetbrains.annotations.NotNull with com.mongodb.lang.NonNull (#1644).
  • Benchmarks and Testing:

    • Introduced Netty benchmark suite (#1647).
    • Added benchmarks for BulkWrite operations (#1657).
    • Began running benchmarks against MongoDB 8.0 (#1660).
  • Bug Fixes and Stability:

    • Made ReadConcernMajorityNotAvailableYet retryable (#1601).
    • Ensured findOne does not unnecessarily set batchSize=1 (#1659).
    • Fixed unnecessary killCursors command when batchSize equals limit (#1656).
  • Documentation and Quality of Life:

    • Improved documentation around the toCollection API (#1677).
    • Updated specification links and submodule management (#1662, #1670).
    • Added Dependabot support for Git submodules (#1691).
  • Kotlin Improvements:

    • Configurable BSON naming strategy to support snake_case (#1627).
    • Add Kotlin Extensions to BOM #1668
    • JAVA-5776 Make KProperty.path() public (#1617)

🧪 Test Enhancements

  • Added IPv6 literal testing in SDAM (#1648).
  • Introduced additional regression and CRUD operation tests (#1692, #1687).
  • Improved testing strategy for flaky unified tests (#1565).

🛠️ Infrastructure Improvements

  • Modernized Gradle build processes and ensured Maven artifacts are properly signed (#1654, #1709).
  • Improved performance test configuration and resource allocation (#1676).

Other Changes

  • Split atlas-deployed-task-group across multiple hosts (#1640)
  • Fix driver-lambda evg failure (#1643)
  • Test Load balancers (#1649)
  • Adjust maxAwaitTimeMS by remaining timeout. (#1650)
  • Deprecate read preference hedge options (#1655)
  • Fix scalac warning (#1666)
  • Record both FaaS and container metadata when both are present (#1661)
  • Add String cache for BsonArray indexes. (#1664)
  • Optimize BsonArray Index encoding (#1673)
  • Fix ByteBufferBsonOutput buffer caching logic. (#1683)
  • Fix the cold Publisher link in the API documentation (#1678)
  • Ignore collectionUUID field if present in change stream tests (#1684)
  • Updated the bom validation to ensure it runs. (#1671)
  • Specifications. (#1690)
  • Reenable clientside-operations-timeout apply maxAwaitTimeMS if less than remaining timeout test (#1693)
  • Update ClientEncryptionCustomEndpointTest (#1694)
  • Skip test for latest (#1700)
  • Added extra test to ignore for reactive streams (#1699)
  • Add non compliance skip for Atlas Data Lake getMore test (#1701)
  • Enable test of nsType with a collection view (#1702)
  • Fix static check warnings. (#1696)
  • Add missing Javadoc. (#1697)
  • DEVPROD-16438 - migrate perf.send to cedar_report endpoint (#1679)
  • Fix validation in release.yml (#1706)

👏 New Contributors

Welcome and thank you to our new contributors:

We appreciate all contributions to the MongoDB Java Driver—thank you!

Full Changelog:(r5.4.0-alpha0...r5.5.0)

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.4/security/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.4.0 (March 20, 2025)

26 Mar 17:07

Choose a tag to compare

What's Changed

🚀 New Features & Enhancements

  • JAVA-5767 Support $lookup in CSFLE and QE #1638
  • Improved selection criteria for srvMaxHosts. #1590
  • Add index hint support for distinct command #1581

Atlas Search Improvements

Bulk Write and Update Enhancements

  • Improved Bulk Write API and added sort option support to updateOne and replaceOne. #1509, #1585, #1612
  • Added Scala Client Bulk Write API. #1603

Driver and Codec Optimizations

  • Optimized BSON codec lookup. #1632
  • Optimized ObjectID sorting and serialization/deserialization. #1582

Client and Connection Handling

  • Updated cursors to refresh timeoutMS on close without affecting operation timeout. #1527
  • Added AsyncTransportSettings and ExecutorService. #1489
  • Ensured connections are not closed prematurely when timeoutMS expires before sending requests. #1573
  • Removed explicit fairness from DefaultConnectionPool. #1575

Cloud and Security Improvements

  • Added OIDC Kubernetes provider support. #1576
  • Updated AWS SDK dependencies. #1639

Kotlin Updates

  • Merging feature branch (Kotlin extensions) into main #1572
  • JAVA-5776 Make KProperty.path() public #1617
  • JAVA-5736 Add bsonNamingStrategy option to support snake_case #1627

🛠 Maintenance and Improvements

  • Renamed Vector class names and marked PackedBitVector as Beta. #1595, #1594
  • Improved handling and initialization of CAPI and jna.Native. #1553
  • Updated Gradle scripts and build configurations. #1620, #1624, #1607, #1569
  • Replaced JetBrains annotations with MongoDB annotations. #1644
  • Stop using the kotlinCheck Gradle task from ssdlc-report.sh #1574

Testing and CI Improvements

  • Clarified and cleaned up internal testing APIs (TestDef). #1566, #1578
  • Enhanced unified test skipping and handling logic. #1557, #1551, #1584
  • Added integration tests for Atlas Search and Load Balancers. #1616, #1649
  • Improved test cleanup and retry logic to reduce flakiness. #1608, #1565

Specification Syncing and Updates

  • Synced BSON and server selection specification tests. #1555, #1554
  • Synced non-lb-connection-establishment. #1634

🐞 Bug & Test Fixes

  • Stop ignoring id parameter #1622
  • Fixed static checker warnings and deprecation warnings. #1564, #1613, #1633
  • Resolved unintended sync test skipping. #1600
  • Fixed module naming for Kotlin extensions. #1602
  • Fixed integration test issues for Regex and Wildcard operators. #1611
  • Update pool-checkout-returned-connection-maxConnecting.json to work with different pool implementations #1563
  • Add flaky annotation to flaky tests #1558
  • Remove deprecated field from GridFS unified tests #1577
  • Fix driver-lambda evg failure #1643
  • Test IPv6 literal in SDAM #1648
  • Split atlas-deployed-task-group across multiple hosts #1640
  • Change branch name to main in SSDLC script. #1552
  • Add @SuppressWarnings("try") to CommandBatchCursorTest, AsyncCommandBatchCursorTest #1567
  • JAVA-5781 Add env var override #1623
  • Evergreen: Update to use stop-orchestration.sh #1621

🌟 Community Contributions

New Contributors:

We appreciate all contributions to the MongoDB Java Driver—thank you!

Full Changelog: r5.3.1...r5.4.0

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.3/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.4.0-alpha0 (February 27, 2025)

27 Feb 22:54

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: r5.3.0-beta0...r5.4.0-alpha0

Java Driver 5.3.1 (January 23, 2025)

23 Jan 11:35

Choose a tag to compare

What's Changed

Full Changelog: r5.3.0...r5.3.1

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.3/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8