Skip to content

Releases: mongodb/mongo-java-driver

Java Driver 5.8.0 (May 28, 2026)

28 May 19:20

Choose a tag to compare

What's Changed

🔥 Enhancements

  • Added typed builder API for vector search index definitions #1960 by @rozza
  • Added $rerank aggregation stage support (MongoDB 8.3 / Atlas) #1963 by @rozza
  • Added vectorSearch operator support for the $search pipeline stage #1962 by @rozza
  • Added storedSource support for vector search indexes and returnStoredSource for $vectorSearch queries #1977 by @rozza
  • Added BinaryVector and VectorSearchQuery vectorSearch overloads to the Scala driver #1986 by @rozza
  • Optimized RawBsonDocument encode and decode by eliminating intermediate allocations #1988 by @rozza
  • Preliminary refactoring for backpressure support #1952 by @stIncMale
  • Small improvements related to value-based classes #1964 by @stIncMale

🛠 Fixes

  • Fixed OSGi bundle resolution failure when Micrometer is not present #1982 by @rozza
  • Added missing Javadoc to MongodbObservation and MongodbObservationContext by @rozza

📦 Dependency Updates

🧪 Testing & CI

  • Added AGENTS.md for AI coding agent support across all modules by @rozza
  • Added test cases for new auto-embedding index fields #1936 by @strogiyotec
  • Added Scala 3 to publish.sh #1958 by @rozza
  • Fixed NamespaceExists test failure #1956 by @nhachicha
  • Simplified RetryState creation as preliminary backpressure work #1961 by @stIncMale
  • Made RetryState.isLastAttempt private and simplified code #1967 by @stIncMale

New Contributors

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/current/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

Full Changelog: r5.7.0...r5.8.0

Java Driver 5.7.0 (April 30, 2026)

30 Apr 16:09

Choose a tag to compare

Important

A future minor release will raise the minimum supported MongoDB Server version from 4.2 to 4.4. This is in accordance with MongoDB Software Lifecycle Schedules. Support for MongoDB Server 4.2 will be dropped in a future release!

What's Changed

New Contributors

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/current/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

Full Changelog: r5.7.0-beta1...r5.7.0

Java Driver 5.6.5 (April 09, 2026)

10 Apr 20:01

Choose a tag to compare

What's Changed

🛠 Fixes

  • AsyncCommandCursor.getMoreLoop() held a pool connection across empty getMore responses on tailable cursors, exhausting the connection pool when idle change streams reached maxPoolSize and causing MongoTimeoutException for all other operations. The retry loop has been moved out of getMoreLoop() and into next().

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

Full Changelog: r5.6.4...r5.6.5

Java Driver 5.7.0-beta1 (February 26, 2026)

26 Feb 20:12

Choose a tag to compare

What's Changed

🔥 Enhancements

  • Add Micrometer/OpenTelemetry tracing support to the reactive-streams
    (Micrometer / OpenTelemetry) #1898

  • Improved client-side timeout handling to better account for RTT variations #1793

🛠 Fixes

  • Fixed RawBsonDocument encoding performance regression by restoring optimized codec path #1888

  • Fixed Netty ByteBuf reference counting and reverted read-only change that could cause leaks during logging #1891

📦 Dependency Updates

  • Updated Netty to latest version #1867

  • Updated Snappy for latest security fixes #1868

🧪 Testing & CI

  • Updated BSON/spec tests and improved Extended JSON alignment #1883

  • Added SARIF reporting and CI improvements #1869

  • Temporarily disabled large encryption tests on mongocryptd for CI stability #1872

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

Full Changelog: r5.7.0-beta0...r5.7.0-beta1

Java Driver 5.6.4 (February 23, 2026)

23 Feb 15:40

Choose a tag to compare

What's Changed

  • Fixed a recent change in how we use Netty buffers that could cause memory to be released too early under certain allocator configurations, leading to unexpected runtime errors. This update restores the correct shared reference-count behavior in Netty (by @vbabanin in #1897 JAVA-6107)

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

Full Changelog: r5.6.3...r5.6.4

Java Driver 5.6.3 (February 03, 2026)

03 Feb 17:39

Choose a tag to compare

What's Changed

  • Revert NettyByteBuf.asReadOnly change (#1871) by @rozza in #1878
    Note: Command Logging with Netty will be fixed in 5.7.0

Full Changelog: r5.6.2...r5.6.3

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