Releases: mongodb/mongo-java-driver
Java Driver 5.7.0-beta0 (January 16, 2026)
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 1a75005e142192223d6a7c3b76e0008d166740a8Full Changelog: r5.4.0-alpha0...r5.7.0-beta0
Java Driver 5.6.2 (December 08, 2025)
Java Driver 5.6.1 (October 06, 2025)
Full Changelog: r5.6.0...r5.6.1
Java Driver 5.5.2 (October 06, 2025)
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)
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
- @abalanonline made their first contribution in #1764
- @zzypersonally made their first contribution in #1653
- @raffaeleflorio made their first contribution in #1610
- @rishitb-mongodb made their first contribution in #1716
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)
What's Changed
- Fixed an issue where OIDC reauthentication failed when sessions were involved (#1725).
- Ensured custom
KPropertyimplementations correctly include property names in their hashcode calculations (#1731). - Resolved failures in datalake and Kubernetes integration tests (#1732).
- Updated to use
OperationContextwith 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 1a75005e142192223d6a7c3b76e0008d166740a8Java Driver 5.5.0 (May 07, 2025)
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
StackwithArrayDequefor better performance (#1681).
-
Resource Management:
-
Compatibility and Maintenance:
-
Benchmarks and Testing:
-
Bug Fixes and Stability:
-
Documentation and Quality of Life:
-
Kotlin Improvements:
🧪 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
scalacwarning (#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
Publisherlink 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 1a75005e142192223d6a7c3b76e0008d166740a8Java Driver 5.4.0 (March 20, 2025)
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
- Added multiple new Atlas Search operators:
phrase,regex,queryString,wildcard,moreLikeThis,equals, andin. #1586, #1587, #1588, #1596, #1609, #1606, #1605
Bulk Write and Update Enhancements
- Improved Bulk Write API and added sort option support to
updateOneandreplaceOne. #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
timeoutMSonclosewithout affecting operation timeout. #1527 - Added
AsyncTransportSettingsandExecutorService. #1489 - Ensured connections are not closed prematurely when
timeoutMSexpires before sending requests. #1573 - Removed explicit fairness from
DefaultConnectionPool. #1575
Cloud and Security Improvements
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
Vectorclass names and markedPackedBitVectoras Beta. #1595, #1594 - Improved handling and initialization of
CAPIandjna.Native. #1553 - Updated Gradle scripts and build configurations. #1620, #1624, #1607, #1569
- Replaced JetBrains annotations with MongoDB annotations. #1644
- Stop using the
kotlinCheckGradle task fromssdlc-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.jsonto 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")toCommandBatchCursorTest,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 1a75005e142192223d6a7c3b76e0008d166740a8Java Driver 5.4.0-alpha0 (February 27, 2025)
What's Changed
- Make
CAPI,jna.Native/Structureinitializable at run time by @stIncMale in #1553 - Clean up unified tests via skipping API by @katcharov in #1551
- Sync BSON specification tests by @jyemin in #1555
- Sync server selection specification tests by @jyemin in #1554
- Update
pool-checkout-returned-connection-maxConnecting.jsonto work with different pool implementations by @stIncMale in #1563 - Fix static checker warnings in
AggregatesSpecification.groovyby @stIncMale in #1564 - Change branch name to main in SSDLC script. by @vbabanin in #1552
- Add flaky annotation to flaky tests by @katcharov in #1558
- Move most skips to single file, expand API to handle conditions by @katcharov in #1557
- Update cursors to refresh
timeoutMSonclosewithout affecting the timeout of the operation by @stIncMale in #1527 - Add AsyncTransportSettings, ExecutorService by @katcharov in #1489
- Add
@SuppressWarnings("try")toCommandBatchCursorTest,AsyncCommandBatchCursorTestby @stIncMale in #1567 - Clean up TestDef API, clarify naming by @katcharov in #1566
- Merging feature branch (Kotlin extensions) into main by @nhachicha in #1572
- Stop using the
kotlinCheckGradle task fromssdlc-report.shby @stIncMale in #1574 - Remove explicit fairness from
DefaultConnectionPoolby @stIncMale in #1575 - Make sure
TestDefis created and used only when there is enough data to do that by @stIncMale in #1578 - Connections must not be closed when timeoutMS expires before sending a request by @stIncMale in #1573
- Remove deprecated field from GridFS unified tests by @joykim1005 in #1577
- Add index hint support for distinct command by @joykim1005 in #1581
- Provide the reason for the test skips. by @vbabanin in #1584
- Rename Vector class names. by @vbabanin in #1595
- Allow updateOne and replaceOne to supply sort option by @joykim1005 in #1585
- Mark PackedBitVector as Beta, aligning with binary quantization preview by @vbabanin in #1594
- Improved Bulk Write API by @stIncMale in #1509
- Resolve unintended sync test skipping. by @vbabanin in #1600
- Fixing default module name for kotlin-extensions by @nhachicha in #1602
- Add phrase operator for Atlas Search by @joykim1005 in #1586
- Format Gradle script to comply with static checks. by @vbabanin in #1607
- Improve selection criteria for srvMaxHosts by @joykim1005 in #1590
- Add regex operator to Atlas Search by @joykim1005 in #1587
- Add queryString operator to Atlas Search by @joykim1005 in #1588
- Add wildcard operator to Atlas Search by @joykim1005 in #1596
- Fix Int Test for Regex and Wildcard Operator by @joykim1005 in #1611
- Add moreLikeThis operator to Atlas Search by @joykim1005 in #1609
- Fix test cleanup to prevent conflicts between tests. by @vbabanin in #1608
- Add Scala Client Bulk Write API. by @vbabanin in #1603
- Remove deprecation warnings. by @vbabanin in #1613
- Add equals operator to Atlas Search by @joykim1005 in #1606
- Client Bulk Write sort option. by @vbabanin in #1612
- Add in operator to Atlas Search by @joykim1005 in #1605
- Evergreen: Update to use stop-orchestration.sh by @rozza in #1621
- Gradle updated to use version catalogs by @rozza in #1620
- Revert "Gradle updated to use version catalogs" by @rozza in #1624
- Optimize ObjectID sort and serdes by @Edarke in #1582
- Stop ignoring id parameter by @katcharov in #1622
- JAVA-5781 Add env var override by @katcharov in #1623
- JAVA-5771 Add search integration tests by @katcharov in #1616
- Fix warnings by @stIncMale in #1633
- Add BOM generation. by @vbabanin in #1569
- JAVA-5791 Sync
non-lb-connection-establishmentby @kevinAlbs in #1634 - Add OIDC k8s provider by @katcharov in #1576
- JAVA-5767 Support $lookup in CSFLE and QE by @katcharov in #1638
New Contributors
- @joykim1005 made their first contribution in #1577
- @Edarke made their first contribution in #1582
Full Changelog: r5.3.0-beta0...r5.4.0-alpha0
Java Driver 5.3.1 (January 23, 2025)
What's Changed
- Fixing default module name for
kotlin-extensions(Backport #1602 to 5.3.x by @nhachicha in #1604)
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