Update all dependencies #69

Open
kjuulh wants to merge 1 commits from renovate/all into main
Owner

This PR contains the following updates:

Package Type Update Change
github.com/nats-io/nats-server/v2 require minor v2.10.26 -> v2.12.2
github.com/nats-io/nats.go require minor v1.39.1 -> v1.47.0
github.com/stretchr/testify require minor v1.10.0 -> v1.11.1
go (source) toolchain minor 1.24.1 -> 1.25.5

Release Notes

nats-io/nats-server (github.com/nats-io/nats-server/v2)

v2.12.2

Compare Source

Changelog

Refer to the 2.12 Upgrade Guide for backwards compatibility notes with 2.11.x.

Go Version
Dependencies
Added

General

  • Support for the PROXY protocol (v1 and v2) for client connections, when proxy_protocol: true is set in the config (#​7456)

JetStream

  • Added meta_compact and meta_compact_size, advanced JetStream config options to control how many log entries must be present in the metalayer log before snapshotting and compaction takes place (#​7484, #​7521)
  • Added write_timeout option for clients, routes, gateways and leafnodes which controls the behaviour on reaching the write_deadline, values can be default, retry or close (#​7513)

Monitoring

  • Added expvar /debug/vars endpoint to the monitoring port (#​7469)
  • Meta cluster snapshot statistics have been added to the /jsz endpoint (#​7524)
  • The /jsz endpoint can now show direct consumers with the direct-consumers?true flag (#​7543)
Improved

General

  • Binary stream snapshots are now preferred by default for nodes on new route connections (#​7479)
  • Reduced allocations in the sublist and subject transforms (#​7519)

JetStream

  • Improved the logging for observer mode (#​7433)
  • Improve interest detection when consumers are created or deleted across different servers (#​7440)
  • Improved the performance of enforcing max_bytes and max_msgs limits (#​7455)
  • Streams and consumers will no longer unnecessarily snapshot when being removed or scaling down (#​7495)
  • Streams are now loaded in parallel when enabling JetStream, often reducing the time it takes to start up the server (#​7482, #​7526)
  • Log lines and errors related to offline/unsupported assets are now clearer (#​7416, #​7425)
  • Stream catchups will now use delete ranges more aggressively, speeding up catchups of large streams with many interior deletes (#​7512)
  • Streams with subject transforms can now implicitly republish based on those transforms by configuring > for both republish source and destination (#​7515)
  • A race condition where subscriptions may not be set up before catchup requests are sent after a leader change has been fixed (#​7518)
  • Reduced heap allocations in hash checks (#​7539)
  • Healthchecks now correctly report when streams are catching up, instead of showing them as unhealthy (#​7535)
  • Potentially reduced the number of calls to the account resolver for assets that are not resident on that server (#​7537)
Fixed

General

  • When using message tracing, header corruption when setting the hop header has been fixed (#​7443)
  • Fixed a bug when validating leafnode proxies (#​7444)
  • Fixed a regression where token authentication would not be parsed correctly in leafnode URLs (#​7452)
  • Gateway subscribe/unsubscribe will no longer block on account fetches (#​7449)
  • Shutting down a server using lame-duck mode should no longer result in max connection exceeded errors (#​7527)

JetStream

  • Caches will now no longer expire unnecessarily when re-reading the same sequences multiple times in first-matching code paths (#​7435)
  • Fixed a bug in atomic batching where the incorrect field would be checked when looking for unsupported headers (#​7436)
  • Fixed a deadlock that could happen when interleaving a direct get request with a batch write (#​7458)
  • A couple of issues related to header handling have been fixed (#​7465)
  • No-wait requests now return a 400 No Messages response correctly if the stream is empty (#​7466)
  • Raft groups will now only report leadership status after a no-op entry on recovery (#​7460)
  • Fixed a race condition in the filestore that could happen between storing messages and shutting down (#​7496)
  • A panic that could occur when recovering streams in parallel has been fixed (#​7503)
  • An off-by-one when detecting holes at the end of a filestore block has been fixed (#​7508)
  • Indexing a message block in the filestore no longer tries to adjust the cache first sequence (#​7508)
  • Writing skip message records in the filestore no longer releases and reacquires the lock unnecessarily (#​7508)
  • Writing message records only overwrites the cache first sequence on the first indexed write (#​7508)
  • Fixed a bug on metalayer recovery where stream and consumer monitor goroutines for recreated assets would run with the wrong Raft group (#​7510)
  • Scaling up an asset from R1 now results in an installed snapshot, allowing recovery after restart if interrupted, avoiding a potential desync (#​7509)
  • Raft groups should no longer report no quorum incorrectly when shutting down (#​7522)
  • Consumers that existed in a metalayer snapshot but were deleted on recovery will no longer result in failing healthchecks (#​7523)
  • An off-by-one when detecting holes at the end of a filestore block has been fixed (#​7525)
  • Fixed a race condition that could happen with shutdown signals when shutting down JetStream (#​7536)
  • Fixed an issue in the filestore where skipping message sequences did not correctly update the cache accounting (#​7534)
  • Fixed a deadlock that could occur when purging a stream with mismatched consumer state (#​7546)
Complete Changes

v2.12.1

Compare Source

Changelog

Refer to the 2.12 Upgrade Guide for backwards compatibility notes with 2.11.x.

Go Version
Dependencies
  • github.com/google/go-tpm v0.9.6 (#​7374)
  • github.com/nats-io/nats.go v1.46.0 (#​7374)
  • golang.org/x/crypto v0.43.0 (#​7423)
  • golang.org/x/sys v0.37.0 (#​7423)
  • golang.org/x/time v0.14.0 (#​7423)
Added

General

  • The NewServerFromConfig function has been added to the embedded server API for parsing an external configuration file when ConfigFile is supplied (#​7364)
  • WebSocket leafnode connections can now use a HTTP proxy by specifying proxy settings in the leafnode remotes (#​7242)
  • The write_deadline option in the cluster, leafnode and gateway config blocks allows configuring write deadlines on a finger-grained basis (#​7405)
Improved

Monitoring

  • The jsz monitoring endpoint can now report leader counts (#​7429)

JetStream

  • The store lock is no longer held while searching for TTL expiry tasks, improving performance (#​7344)
  • Removing a message from the TTL state is now faster (#​7344)
  • The filestore no longer performs heap allocations for hash checks (#​7345)
  • The filestore now reuses pooled write cache allocations more efficiently (#​7346)
  • Meta snapshot performance for a very large number of assets has been improved after a regression in v2.11.9 (#​7350)
  • Sequence-from-timestamp lookups, such as those using opt_start_time on consumers or start_time on message get requests, now use a binary search for improved lookup performance (#​7357)
  • Scheduled messages are now deactivated properly when followed up with another message on the same subject without a schedule (#​7366)
  • Meta snapshots are no longer taken on every stream removal (#​7373)
  • Filestore cache lookups can now return early for empty blocks (#​7381)
  • Filestore meta files are now written using temporary staging, avoiding accidental truncation on crashes (#​7388)
  • Atomic batch publish now supports deduplication with the Nats-Msg-Id header (#​7391)
  • Cache-specific log lines in the filestore have been improved (#​7396)
  • Log lines and errors related to offline/unsupported assets are now clearer (#​7416, #​7425)
Fixed

General

  • Fixed the exit code when receiving a SIGTERM signal immediately after startup (#​7367)
  • The $SYS.REQ.CLAIMS.DELETE endpoint now correctly strips headers, like the $SYS.REQ.CLAIMS.UPDATE endpoint already does (#​7413)
  • Log lines generated when reloading trusted proxies now report the correct keys (#​7427)

JetStream

  • Batch check now uses the correct subject instead of the last subject that does the commit (#​7342)
  • Removed messages with a per-message TTL are now removed from the TTL state immediately (#​7344)
  • Fixed a bug where TTL state was recovered on startup with subject delete markers enabled, that message expiry would not start as expected (#​7344)
  • Expiring messages from the filestore no longer leaks timers and expires at the correct time (#​7344)
  • Fixed a bug where scheduled messages would not trigger correctly after recovery (#​7347)
  • Deleting a non-existent sequence on a stream no longer results in a cluster reset and leadership election (#​7348)
  • Subject tree intersection now correctly handles overlapping literals and partial wildcards, i.e. stream.A and stream.*.A, fixing some consumer or message get filters (#​7349)
  • A data race when checking all JetStream limits has been fixed (#​7356)
  • Raft will no longer trigger a reset of the clustered state due to a stream snapshot timeout (#​7293)
  • Atomic batches now reject unsupported commits (#​7368)
  • Race conditions and potential panics fixed in the handling of some JetStream API handlers (#​7380)
  • The filestore no longer loses tombstones when using secure erase (#​7384)
  • The filestore no longer loses the last sequence when recovering blocks containing only tombstones (#​7384)
  • The filestore now correctly cleans up empty blocks when selecting the next first block (#​7384)
  • The filestore now correctly obeys sync_always for writing TTL and scheduling state files (#​7385)
  • The filestore will now correctly expire a cache when the wrong sequence is found (#​7396)
  • Fixed a data race on a wait group when mirroring streams (#​7395)
  • Skipped message sequences are now checked for ordering before apply, fixing a potential stream desync on catchups (#​7400)
  • Skipped message sequences now correctly detect gaps from erased message slots, fixing potential cache issues, slow reads and issues with catchups (#​7399, #​7401)
  • Raft groups now report peer activity more consistently, fixing some cases where asset info and monitoring endpoints may report misleading values after leader changes (#​7402)
  • Raft groups will no longer permit truncations from unexpected catchup entries if the catchup is completed (#​7424)
  • The filestore will now correctly release locks when erasing messages returns an error (#​7431)
Complete Changes

v2.12.0

Compare Source

Changelog

Refer to the 2.12 Upgrade Guide for backwards compatibility notes with 2.11.x.

Go Version
Added

General

  • Exponential backoff on route/gateway reconnection attempts (#​7042, #​7048)
  • Added allow_insecure_cipher_suites configuration option to tls block, as insecure ciphers are now disabled by default (#​7144)
  • Added X25519MLKEM768 option to the TLS curve preferences (#​7280)
  • No responders errors from the server now include the original subject in the Nats-Subject header (#​5250)
  • Added exact_match field to the filtering of various monitoring endpoints for server name, host or cluster matching (#​7260)

JetStream

Leafnodes

  • Added the ability to isolate leafnode subject interest propagation with the hub-side isolate_leafnode_interest configuration option, suppressing east-west traffic and reducing subscription overheads when there are many leafnodes (#​7238, #​7243, #​7277)
  • Added disabled option for leafnode remotes, with support for reloading from the config at runtime (#​7054)
Changed

General

  • WebSocket and MQTT clients no longer use TCP keepalives (#​7329)

JetStream

  • The JetStream API level has been increased to 2 (#​6969)
  • The API surface is now in strict mode by default, erroring if unknown fields are provided in the request body (#​7049)
  • Replicated streams will now default to async flush as long as sync: always is not configured (#​7018, #​7163)
  • The default value for max_buffered_msgs has been increased by 10x to 100,000 messages (#​6633)
Improved

General

  • When logging closed connections, the remote is now logged if known, making it easier to identify where route/gateway/leafnode connections have dropped (#​7077)
  • Client-specific log lines now include the account and user if known (#​7079)

JetStream

  • Raft nodes will no longer respond success to catchup messages and will ignore responses if not leader, fixing some potential stream desync scenarios (#​6944)
  • Replicated streams can now be created even if some of the replica nodes are offline (#​7075)
  • The storage type is now logged when logging resource limits exceeded (#​7076)
  • JetStream API requests are always handled from the worker pool, improving the semantics of the API request queue and logging when requests take too long (#​7125)
  • Filestore in-memory caches now use weak pointers and can respond to garbage collector (GC) pressure, which should help to avoid a number of possible out-of-memory scenarios (#​7180)
  • Filestore buffer reuse has been fixed (#​7295)
  • Raft will no longer send any append entries in a known non-leader state (#​7297)
  • Improved recovery of filestore blocks with unexpected sequence ordering (#​7303, #​7304, #​7305)
  • Filestore fixes to improve write correctness, particularly when combined with async mode (#​7318, #​7331)

Leafnodes

  • Leafnode connections without auth no longer unexpectedly connect to the global account (#​7116)
Fixed

JetStream

  • Improved validation for stream/consumer configs (#​7134)
  • An error will now be correctly surfaced when the Nats-Expected-Last-Subject-Sequence-Subject header is supplied but the accompanying Nats-Expected-Last-Subject-Sequence header is not (#​7196)

OCSP

  • URL encoding of OCSP requests should now be RFC4648-compliant (#​7184)
Complete Changes

v2.11.11

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
Dependencies
Added

JetStream

  • Added meta_compact and meta_compact_size, advanced JetStream config options to control how many log entries must be present in the metalayer log before snapshotting and compaction takes place (#​7484, #​7521)
  • Added write_timeout option for clients, routes, gateways and leafnodes which controls the behaviour on reaching the write_deadline, values can be default, retry or close (#​7513)

Monitoring

  • Meta cluster snapshot statistics have been added to the /jsz endpoint (#​7524)
  • The /jsz endpoint can now show direct consumers with the direct-consumers?true flag (#​7543)
Improved

General

  • Binary stream snapshots are now preferred by default for nodes on new route connections (#​7479)
  • Reduced allocations in the sublist and subject transforms (#​7519)

JetStream

  • Improved the logging for observer mode (#​7433)
  • Improved the performance of enforcing max_bytes and max_msgs limits (#​7455)
  • Streams and consumers will no longer unnecessarily snapshot when being removed or scaling down (#​7495)
  • Streams are now loaded in parallel when enabling JetStream, often reducing the time it takes to start up the server (#​7482)
  • Stream catchups will now use delete ranges more aggressively, speeding up catchups of large streams with many interior deletes (#​7512)
  • Streams with subject transforms can now implicitly republish based on those transforms by configuring > for both republish source and destination (#​7515)
  • A race condition where subscriptions may not be set up before catchup requests are sent after a leader change has been fixed (#​7518)
  • JetStream recovery parallelism now matches the I/O gated semaphore (#​7526)
  • Reduced heap allocations in hash checks (#​7539)
  • Healthchecks now correctly report when streams are catching up, instead of showing them as unhealthy (#​7535)
  • Improve interest detection when consumers are created or deleted across different servers (#​7440)

Monitoring

  • The jsz monitoring endpoint can now report leader counts (#​7429)
Fixed

General

  • When using message tracing, header corruption when setting the hop header has been fixed (#​7443)
  • Shutting down a server using lame-duck mode should no longer result in max connection exceeded errors (#​7527)

JetStream

  • Race conditions and potential panics fixed in the handling of some JetStream API handlers (#​7380)
  • The filestore no longer loses tombstones when using secure erase (#​7384)
  • The filestore no longer loses the last sequence when recovering blocks containing only tombstones (#​7384)
  • The filestore now correctly cleans up empty blocks when selecting the next first block (#​7384)
  • The filestore now correctly obeys sync_always for writing TTL and scheduling state files (#​7385)
  • Fixed a data race on a wait group when mirroring streams (#​7395)
  • Skipped message sequences are now checked for ordering before apply, fixing a potential stream desync on catchups (#​7400)
  • Skipped message sequences now correctly detect gaps from erased message slots, fixing potential cache issues, slow reads and issues with catchups (#​7399, #​7401)
  • Raft groups now report peer activity more consistently, fixing some cases where asset info and monitoring endpoints may report misleading values after leader changes (#​7402)
  • Raft groups will no longer permit truncations from unexpected catchup entries if the catchup is completed (#​7424)
  • The filestore will now correctly release locks when erasing messages returns an error (#​7431)
  • Caches will now no longer expire unnecessarily when re-reading the same sequences multiple times in first-matching code paths (#​7435)
  • A couple of issues related to header handling have been fixed (#​7465)
  • No-wait requests now return a 400 No Messages response correctly if the stream is empty (#​7466)
  • Raft groups will now only report leadership status after a no-op entry on recovery (#​7460)
  • Fixed a race condition in the filestore that could happen between storing messages and shutting down (#​7496)
  • A panic that could occur when recovering streams in parallel has been fixed (#​7503)
  • An off-by-one when detecting holes at the end of a filestore block has been fixed (#​7508)
  • Writing skip message records in the filestore no longer releases and reacquires the lock unnecessarily (#​7508)
  • Fixed a bug on metalayer recovery where stream and consumer monitor goroutines for recreated assets would run with the wrong Raft group (#​7510)
  • Scaling up an asset from R1 now results in an installed snapshot, allowing recovery after restart if interrupted, avoiding a potential desync (#​7509)
  • Raft groups should no longer report no quorum incorrectly when shutting down (#​7522)
  • Consumers that existed in a metalayer snapshot but were deleted on recovery will no longer result in failing healthchecks (#​7523)
  • An off-by-one when detecting holes at the end of a filestore block has been fixed (#​7525)
  • Fixed a race condition that could happen with shutdown signals when shutting down JetStream (#​7536)
  • Fixed a deadlock that could occur when purging a stream with mismatched consumer state (#​7546)
Complete Changes

v2.11.10

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
  • 1.24.7
Dependencies
  • golang.org/x/crypto v0.42.0 (#​7320)
  • github.com/google/go-tpm v0.9.6 (#​7376)
  • github.com/nats-io/nats.go v1.46.1 (#​7377)
Improved

General

  • Statistics for gateways, routes and leaf connections are now correctly omitted from accstatsz responses if empty (#​7300)

JetStream

  • Stream assignment check has been simplified (#​7290)
  • Additional guards prevent panics when loading corrupted messages from the filestore (#​7299)
  • The store lock is no longer held while searching for TTL expiry tasks, improving performance (#​7344)
  • Removing a message from the TTL state is now faster (#​7344)
  • The filestore no longer performs heap allocations for hash checks (#​7345)
  • Meta snapshot performance for a very large number of assets has been improved after a regression in v2.11.9 (#​7350)
  • Sequence-from-timestamp lookups, such as those using opt_start_time on consumers or start_time on message get requests, now use a binary search for improved lookup performance (#​7357)
  • JetStream API requests are always handled from the worker pool, improving the semantics of the API request queue and logging when requests take too long (#​7125)
  • JetStream will no longer perform a metalayer snapshot on every stream removal request, reducing API pauses and improving meta performance (#​7373)
Fixed

General

  • Fixed the exit code when receiving a SIGTERM signal immediately after startup (#​7367)

JetStream

  • Fixed a use-after-free bug and a buffer reclamation issue in the filestore flusher (#​7295)
  • Direct get requests now correctly skip over deleted messages if the starting sequence is itself deleted (#​7291)
  • The Raft layer now strictly enforces that non-leaders cannot send append entries (#​7297)
  • The filestore now correctly handles recovering filestore blocks with out-of-order sequences from disk corruption (#​7303, #​7304)
  • The filestore now produces more useful error messages when disk corruption is detected (#​7305)
  • Removed messages with a per-message TTL are now removed from the TTL state immediately (#​7344)
  • Fixed a bug where TTL state was recovered on startup with subject delete markers enabled, that message expiry would not start as expected (#​7344)
  • Expiring messages from the filestore no longer leaks timers and expires at the correct time (#​7344)
  • Deleting a non-existent sequence on a stream no longer results in a cluster reset and leadership election (#​7348)
  • Subject tree intersection now correctly handles overlapping literals and partial wildcards, i.e. stream.A and stream.*.A, fixing some consumer or message get filters (#​7349)
  • A data race when checking all JetStream limits has been fixed (#​7356)
  • Raft will no longer trigger a reset of the clustered state due to a stream snapshot timeout (#​7293)
Complete Changes

v2.11.9

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
Dependencies
Improved

JetStream

  • Offline assets support (#​7158)
    • Server version 2.12 will introduce new features that would otherwise break a 2.11 server after a downgrade. The server now reports the streams/consumers as offline and unsupported, keeping the data safe, but allowing to either delete the asset or upgrade back to the supported version without changes to the data itself.
  • The raftz endpoint now reports the cluster traffic account (#​7186)
  • The stream info and consumer info endpoints now return leader_since (#​7189)
  • The stream info and consumer info endpoints now return system_account and traffic_account (#​7193)
  • The jsz monitoring endpoint now returns system_account and traffic_account (#​7193)
Fixed

General

  • Fix a panic that could happen at startup if building from source using non-Git version control (#​7178)
  • Fix an issue where issuing an account JWT update with a connection limit could cause older clients to be disconnected instead of newer ones (#​7181, #​7185)
  • Route connections with invalid credentials will no longer rapidly reconnect (#​7200)
  • Allow a default_sentinel JWT from a scoped signing key instead of requiring it to solely be a bearer token for auth callout (#​7217)
  • Subject interest would not always be propagated for leaf nodes when daisy chaining imports/exports (#​7255)
  • Subject interest would sometimes be lost if the leaf node is a spoke (#​7259)
  • Lowering the max connections limit should no longer result in streams losing interest (#​7258)

JetStream

  • The Nats-TTL header will now be correct if the subject delete marker TTL overwrites it (#​7177)
  • In operator mode, the cluster_traffic state for an account is now restored correctly when enabling JetStream at startup (#​7191)
  • A potential data race during a consumer create or update when reading its paused state has been fixed (#​7201)
  • A race condition that could allow creating a consumer with more replicas than the stream has been fixed (#​7202)
  • A race condition that could allow creating the same stream with different configurations has been fixed (#​7210, #​7212)
  • Raft will now correctly reject delayed entries from an old leader when catching up in the meantime (#​7209, #​7239)
  • Raft will now also limit the amount of cached in-memory entries as the leader, avoiding excessive memory usage (#​7233)
  • A potential race condition delaying shutdown if a stream/consumer monitor goroutine was not started (#​7211)
  • A benign underflow when using an infinite (-1) MaxDeliver for consumers (#​7216)
  • A potential panic to send a leader elected advisory when shutting down before completing startup (#​7246)
  • Stopping a stream should no longer wait indefinitely if the consumer monitor goroutine wasn’t stopped (#​7249)
  • Speed up stream mirroring and sourcing after a leaf node reconnects in complex topologies (#​7265)
  • Updating a stream with an empty placement will no longer incorrectly trigger a stream move (#​7222)

Tests

Complete Changes

v2.11.8

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
Dependencies
Added

General

  • Community-contributed support for building on Solaris and Illumos (#​7122, thanks to @​jwntree)
Fixed

General

  • String-to-integer parsing has been improved in various places to prevent overflows/underflows (#​7145)

JetStream

  • Fixed an incorrectly formatted log line when failing to load a block when recovering TTLs (#​7150)
  • Raft will now step down if a higher term is detected during a catchup (#​7151)
  • Raft will now more reliably ignore entries from previous/cancelled catchups that arrive late (#​7151)
  • Fix a potential panic that could happen by a division by zero when applying Raft entries (#​7151)
  • The healthcheck endpoint should no longer report transient errors for newly created or recently deleted consumers (#​7154)
  • Fix a potential panic when trying to truncate a filestore block that doesn't exist (#​7162)
  • Clean up stale index.db file when truncating so that it is not inconsistent if the truncate operation is interrupted (#​7162)
  • Fix an off-by-one problem when Raft truncates to the correct index at startup (#​7162)
  • Ephemeral consumers will always select an online server when created on a replicated stream (#​7165)

Tests

Complete Changes

v2.11.7

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
Dependencies
Added

General

  • The SubjectMatchesFilter function is now available as an exported function for embedded use (#​7051)
  • The leafz monitoring endpoint now includes the connection ID (#​7063)
  • The monitoring endpoint index page now includes the endpoint names on hover (#​7066, #​7087)
Improved

JetStream

  • Consumers with inactivity thresholds should no longer age out before processing acks (#​7107)
  • The Raft layer will no longer request store state on each apply (#​7109)
  • Tombstones in Raft log compactions will now be written asynchronously, similar to purges (#​7109)
  • When enabling per-message TTLs on a stream, existing messages with the Nats-TTL header are now scanned and processed (#​7117)
Fixed

General

  • Message header lookups with common prefixes will now return correctly in all cases, fixing a problem where the headers could be sensitive to ordering (#​7065)
  • Validate that the default_sentinel JWT is a bearer token for auth callout (7074)
  • The $SYS.REQ.USER.INFO endpoint should now only be answered by the local server, fixing cases where the endpoint may sometimes return without full connection details (#​7089)

JetStream

  • The Raft layer will require recovery and snapshot handling at startup before campaigning for a leadership election, fixing a situation where a node could continue with an outdated stream (#​7040)
  • The Raft log will no longer be compacted until after a snapshot is written, improving crash resilience (#​7043)
  • A race condition when shutting down Raft nodes which could result in no snapshot being written has been fixed (#​7045)
  • Consumer pull requests that use no_wait or expires behaviour has been fixed with replicated consumers (#​7046)
  • Pull consumers with an inactive threshold will now consider pending acks when determining inactivity, preventing the consumer from being deleted while messages are being processed (#​7052)
  • Push consumers will now correctly error when trying to configure priority groups (#​7053)
  • Committed entry objects will now be correctly returned to the pool on error, reducing allocations (#​7064)
  • The time hash wheel used for per-message TTLs now correctly detects and expires messages with TTLs over an hour, previously it could take double the expected time (#​7070)
  • A potential panic when selecting message blocks during TTL recovery has been fixed (#​7072)
  • A KV purge operation with subject delete markers configured will no longer leave behind a redundant extra delete marker (#​7026)
  • Raft will now correctly attempt to truncate back to a snapshot if applies were not caught up instead of resetting the entire log (#​7095)
  • Store cipher conversion will now work correctly when combined with store compression (#​7099)
  • Truncate and erase operations in the filestore should now be consistent after a hard kill (#​7100)
  • When a filestore message block is deleted and an unclean shutdown results in a stale index.db, the deleted blocks are now correctly marked as lost data and the index is rebuilt (#​7123)
  • Fixed a potential underflow that could happen when modifying max_bytes reservations (#​7131)

Tests

Complete Changes

v2.11.6

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
  • 1.24.4
Improved

JetStream

  • Sources will no longer update their last seen timestamp when stalled, making it clearer how long it has been since the last contact (#​7013)
  • Overall consumer performance has been improved by reducing allocations and improving the num pending calculation (#​7022)
Fixed

General

  • The subsz monitoring endpoint now returns the correct total for subscription details, aligning behaviour with other endpoints for pagination (#​7009)

JetStream

  • Fixed a bug where filestore encryption could corrupt a message block if a write took place before a read after restarting the server (#​7008)
  • Fixed a performance regression introduced in v2.11.0 which could result in abnormally low throughput from filtered consumers and higher GC pressure (#​7015)
  • Healthchecks will no longer produce unexpected monitor goroutine warnings when a clustered stream is restored from a snapshot (#​7019)
  • A race condition that could result in removed streams incorrectly reappearing has been fixed (#​7025)
  • The reserved_memory and reserved_storage statistics will no longer underflow when no limits are set (#​7024)
Complete Changes

v2.11.5

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
Dependencies
  • github.com/nats-io/nats.go v1.43.0 (#​6956)
  • golang.org/x/crypto v0.39.0 (#​6956)
  • golang.org/x/time v0.12.0 (#​6956)
Improved

General

  • The connz monitoring endpoint now includes leafnode connections (#​6949)
  • The accstatsz monitoring endpoint now contains leafnode, route and gateway connection stats (#​6967)

JetStream

  • Sourcing and mirroring should now resync more quickly when sourcing over leafnodes after a connection failure (#​6981)
  • Reduced lock contention when reporting stream ingest warnings (#​6934)
  • Log lines for resetting Raft WAL state have been clarified (#​6938)
  • Determining if acks are required in interest-based streams has been optimised with fewer memory allocations (#​6990)
  • Ephemeral R1 consumers will no longer log new consumer leader on clustered setups, reducing log noise when watchers etc are in use (#​7003)
Fixed

General

  • Leafnodes with restrictive permissions can now route replies correctly when the message originates from a supercluster (#​6931)
  • Memory usage is now reported correctly on Linux systems with huge pages enabled (#​7006)

JetStream

  • Updating the AllowMsgTTL setting on a stream will now take effect correctly (#​6922)
  • A potential deadlock when purging stream consumers has been fixed (#​6933)
  • A race condition that could prevent stream snapshots on shutdown has been fixed (#​6942)
  • Streams should no longer desync after a partial catchup following a snapshot (#​6943)
  • Streams should no longer desync due to catchup messages with incorrect quorum (#​6944)
  • Intersection between two subject trees where one is nil will no longer panic (#​6945)
  • Consumer pull requests with NoWait will now return correctly from replicated consumers (#​6960)
  • Mirrors now remove Nats-Expected- headers that could interfere with mirroring operations (#​6961)
  • Network-partitioned Raft nodes should no longer desync by accepting catchups from nodes with lower term (#​6951)
  • A potential data race when accessing the cluster failed sequence count has been fixed (#​6965)
  • Corrected handling of append entry response conditions and recycling to the response pool (#​6968)
  • A potential data race when copying stream metadata has been fixed (#​6983)
  • Healthchecks will no longer unset a group Raft node when not fully setup (#​6984)
  • Stream retention policy changes are now correctly propagated to running consumers in all cases (#​6995)
  • Raft now uses monotonic time for heartbeat tracking and determining quorum, making it resilient against wall-clock drifts or adjustments from NTP (#​6999)
  • The healthz monitoring endpoint no longer tries to fix up cluster node skews, as this could interfere with processing assignments (#​7001)
  • The consumer DeliverLastPerSubject delivery policy now correctly deliver messages and handles acks when there are interior deletes, such as when MaxMsgsPerSubject limits are in use on the stream (#​7005)
  • Consumers that are up against the MaxWaiting limit will no longer respond if the request heartbeat is set, to avoid client tightloops (#​7011)
Complete Changes

v2.11.4

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
Dependencies
  • github.com/nats-io/nats.go v1.42.0 (#​6868)
  • golang.org/x/crypto v0.38.0 (#​6868)
  • golang.org/x/sys v0.33.0 (#​6868)
  • github.com/google/go-tpm v0.9.5 (#​6918)
Improved

General

  • Log lines for TLS handshake errors now include the subject and SHA-256 hash of the certificate if known (#​6883)

JetStream

  • Enforcing per-subject limits on streams after a state rebuild or retention policy change is now considerably faster (#​6871)
  • Reduced allocations when finding the next message matching a filter in the filestore, which also improves the performance of calculating interest state on streams with an interest/WQ retention policy (#​6908)
Fixed

General

  • Reloading the gateway TLS configuration now applies to implicit remotes (#​6886)

JetStream

  • Stream and consumer updates are no longer possible if all peers are offline, fixing a potential avenue for data loss (#​6856)
  • The stream first sequence is now adjusted correctly when purging over interior delete gaps (#​6861)
  • Consumer redeliveries are no longer incorrectly reported for consumers with a max deliver of 1 (#​6877)
  • Avoid resetting the first and last sequences of a workqueue stream to zero after a crash with unflushed data (#​6882)
  • Access time goroutines are now reference-counted and no longer leak (#​6887)
  • Fixed a deadlock that could occur when using multi_last direct gets or when calculating the first sequence number for a consumer with a deliver-last-per-subject deliver policy (#​6899)
  • A spelling error in a store error was fixed (#​6895) Thanks to @​cjohansen for the contribution!
  • A rare panic in the filestore has been fixed (#​6912)
  • Direct gets will no longer return messages incorrectly with up_to_time or start_time in some configurations (#​6911)
  • Fixed a panic in the stree that could occur when removing subject state tracking for a short subject (#​6914)
Complete Changes

v2.11.3

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
  • 1.24.2
Added

MQTT

  • New js_api_timeout option controls how long to wait for JetStream operations caused by MQTT calls (#​6833)
Improved

JetStream

  • Reduced allocations in subject tree matching (#​6837)
Fixed

General

  • Fixed TLS 1.2 negotiation when using ECDSA certificates from the Windows certificate store (#​6803)

JetStream

  • Fix a regression introduced in v2.11.2 which can affect calculating consumer subject interest (#​6845)
  • Consumer state reporting of filtered consumers is now more consistent (#​6835)
  • Raft nodes will now correctly report to the upper layer when a preferred node does not become the leader, fixing some issues where multiple assets can believe they are the leader after a scale-up operation (#​6851)

Monitoring

  • The connz endpoint will now return open connections correctly with state set to all (#​6849)
Complete Changes

v2.11.2

Compare Source

[!IMPORTANT]
This version contains a regression that has since been fixed in 2.11.3. Please upgrade to that version instead.

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
  • 1.24.2
Dependencies
  • github.com/nats-io/nats.go v1.41.2 (#​6805)
  • github.com/nats-io/nkeys v0.4.11 (#​6805)
  • github.com/nats-io/jwt/v2 v2.7.4 (#​6813)
Added

General

  • Support for a default sentinel JWT, which is used in operator mode when none is specified, has been added making it possible to have default users (#​6577)
  • New trace_headers option to ensure that trace logging only emits headers and not message payloads (#​6638)

JetStream

  • Subject delete markers are now placed for messages that have aged out due to their TTL and not just because of the MaxAge policy (#​6741)
Improved

General

  • The publish permissions cache should now remain under the max allowed size more aggressively with improved pruning (#​6674)
  • It is now possible with service imports to import the same subject from multiple different accounts (#​6704)
  • Updating an account claim with a reduced max connection count no longer causes internal clients to be closed, fixing cases where JetStream assets could become unavailable (#​6785)
  • GOMAXPROCS and GOMEMLIMIT are now reported in both statsz and varz (#​6791)
  • Improved tls_timeout configuration parsing consistency between authorization and timeout (#​6731)
  • Allow servers with different pool sizes when using multiple routes, simplifying configuration changes and rolling updates (#​6676)
  • Auth tokens are now redacted in trace-level logs for enhanced security (#​6808)
  • Trapped signals are now logged at notice level instead of debug (#​6800)

JetStream

  • Improved purge performance, particularly for KV PurgeDeletes calls, with optimised code paths for finding last sequences and reducing allocations (#​6801, #​6825)
  • Improved replicated asset creation performance by campaigning for group leadership more quickly (#​6697)
  • Improved the debug log message when resetting a group WAL after failing to truncate (#​6705)
  • Improved checking for streams that overlap with JS API or system subjects, so that badly-configured streams should not be able to break the API (#​6786)
  • Allow setting per-message TTLs to values lower than the configured SubjectDeleteMarkerTTL when the stream has a max messages per subject limit of 1 (#​6818)
  • Servers that have been peer-remove'd can now be re-admitted automatically after 5 minutes without a server restart (#​6815)
Fixed

General

  • Fix a possible panic when a subject transform has missing tokens (#​6612)
  • Fix a possible panic when adding dedicated routes during a configuration reload (#​6668)
  • Data race when shutting down eventing has been resolved (#​6620)
  • A deadlock when updating account claims with service imports/exports has now been fixed (#​6726)
  • The jsz monitoring endpoint now correctly paginates with offset (#​6794, #​6816)
  • Parsing the cluster_traffic option at startup no longer results in a panic if the account has not loaded yet (#​6733)

JetStream

  • Fix clustered consumer consistency problems by waiting for delivered state to reach quorum before delivering new messages, resolving issues where acknowledged messages could be redelivered after a consumer leader change
    • NOTE: This may negatively impact the throughput of replicated consumers. R1 consumers, consumers with AckNone ack policy and ordered consumers are not affected and may be more suitable for high-speed processing
  • JetStream is no longer incorrectly disabled when specifying --js and --store_dir on the command line and then issuing a configuration reload (#​6609)
  • Correctly remove messages from an interest-based stream when using AckAll consumers (#​6587)
  • Preserve the first sequence when rebuilding state due to invalid checksums with no remaining messages (#​6647)
  • When recovering from disk, ignore temporary files that can be created during stream compression so that the same blocks do not get loaded more than once (#​6684)
  • Do not incorrectly reset group WALs when a new leader sends matching term information after a snapshot (#​6691)
  • Corrected a regression in the memory store when purging, aligning it with the filestore behaviour (#​6714)
  • When issuing a peer remove on a stream, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers (#​6720)
  • When issuing a peer remove on a consumer, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers (#​6727)
  • A race condition that could result in observer nodes becoming incorrectly elected as a group leader has been fixed when using leafnodes with shared system accounts (#​6730)
  • Ensure that duplicate Raft groups are not created for the same asset during a restart (#​6732)
  • Allow the use of the extended consumer create API when combining service imports/exports and limited API permissions (#​6759)
  • Streams with the FirstSeq configured are no longer incorrectly purged after a restart if the stream first sequence still matches the configured first sequence (#​6753)
  • Correctly write tombstones when purging and compacting, fixing a bug that could result in some deleted messages returning if the stream index had to be rebuilt (#​6685)
  • The memory store no longer leaks memory tracking deleted sequences after a full stream purge (#​6769)
  • Correctly handle acks for subjects that include a @ character (#​6777)
  • Avoid losing stream sequence numbers of the server is interrupted by generating a new last message block before removing the final remaining block, particularly noticeable with WQ or interest retention policies (#​6778)
  • Use the correct floor when using AckAll in R1 consumers (#​6790)
  • Preserve consumer state when a stream needs to be reset due to a failed catchup (#​6796)
  • Correctly enforce the 32MB maximum publish size limit into JetStream, avoiding filestore corruption from overflowing the maximum record length (#​6798)
  • Preserve the redelivered state if the consumer leader is placed on a server that is a lagging stream follower to keep accounting correct (#​6698)
  • Idempotent stream or consumer creations on a server upgrade from 2.10.x will no longer fail due to metadata changes (#​6716)
  • Do not place rejected messages with invalid TTLs into the deduplication map if using Nats-Msg-Id (#​6725)
  • Message TTLs are now recovered properly from multiple messages if the timed hash wheel state is lost or corrupted on disk (#​6758)
  • Consumer priority groups will no longer get stuck in a tight-loop if there are multiple requests from different clients but some are not receiving due to the priority policy (#​6749)
  • Subject delete markers are now replicated more reliably and are now retriable, improving consistency in clustered mode (#​6776)
  • Tombstones are now correctly written for messages that have aged out due to their TTL, such that the deletion is preserved if the stream state is rebuilt (#​6781)
  • Corrected an off-by-one error that could cause the TTL state to be rebuilt unnecessarily on a server restart (#​6679)
  • Fixed a race condition in the timed hash wheel that could result in an underflow of the hash count (#​6787)
  • Push consumers are no longer incorrectly marked as inactive after a delivery failure if there is continued interest (#​6807)
  • Internal clients for JetStream are no longer closed unexpectedly after updating an expired account claim (#​6817)
  • Fixed a panic that could potentially occur when starting clustered consumers when the metalayer is shutting down (#​6823)
  • Fixed a bug in subject tree intersection that could miss some subjects when looking for first matching messages matching FilterSubjects (#​6828)
  • Subject delete markers now have the correct headers when retrieved using direct get (#​6826)
  • Messages with a TTL now are removed correctly after a restart has interrupted the deletion process (#​6828)

Gateways

  • Fixed a bug that could result in a lost queue subscriptions on gateway connections after a restart or a remote unsubscribe (#​6607)
Complete Changes

v2.11.1

Compare Source

Changelog

Go Version
  • 1.24.1
CVEs
  • This release contains fixes for CVE-2025-30215, a CRITICAL severity vulnerability affecting all NATS Server versions from v2.2.0, prior to v2.11.1 or v2.10.27.
Fixed

JetStream

  • Correctly validate the calling account on a number of system API calls
  • Check system and account limits when processing a stream restore
Complete Changes

v2.11.0

Compare Source

Changelog

Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.

Go Version
Dependencies
  • golang.org/x/crypto v0.36.0 (#​6618)
  • golang.org/x/sys v0.31.0 (#​6618)
  • golang.org/x/time v0.11.0 (#​6618)
  • github.com/google/go-tpm v0.9.3 (#​6295)
  • github.com/antithesishq/antithesis-sdk-go v0.4.3-default-no-op (#​6164)
Added

General

  • Distributed message tracing (#​5014, #​5057)
    • A message with the Nats-Trace-Dest header set to a valid subject will receive events representing what happens to the message as it moves through the system
    • Events contain information such as ingress, subject mapping, stream exports, service imports, egress to subscriptions, routes, gateways or leafnodes
    • An additional Nats-Trace-Only header, if set to true, will produce the same tracing events but will not deliver the message to the final destination
  • Configuration state digest (#​4325)
    • A hash of the configuration file can be generated using the -t option on the command line
    • The hash of the currently running configuration file can be seen in the config_digest option in varz
  • Enable scoped users to have templates that are not limited to a subject token (#​5981)
  • New js-meta-only option for healthz healthcheck (#​6649)

JetStream

  • Per-message TTLs (#​6272, #​6354, #​6363, #​6370, #​6376, #​6385, #​6400)
    • The Nats-TTL header, provided either as a string duration (1m, 30s) or an integer in seconds, will age out the message independently of stream limits
    • More information on this is available in ADR-43
  • Subject delete markers on MaxAge (#​6378, #​6389, #​6393, #​6400, #​6404, #​6428, #​6432)
    • The SubjectDeleteMarkerTTL stream configuration option determines whether to place marker messages and how long they should live for
    • The marker message will have a Nats-Marker-Reason header explaining which limit caused the marker to be left behind
    • More information on this is available in ADR-43
  • Pull consumer priority groups with pinning and overflow (#​5814, #​6078, #​6081)
    • Allows patterns such as one consumer receiving all messages, but handing over to a second consumer if the first one fails, or groups of clients accessing the same consumer should have different priorities
    • The PriorityGroups and PriorityPolicy options in the consumer configuration control the policy
    • More information on this is available in ADR-42
  • Consumer pausing (#​5066)
    • The PauseUntil consumer configuration option and $JS.API.CONSUMER.PAUSE endpoint suspends message delivery to the consumer until the time specified is reached, after which point it will resume automatically
  • Asset versioning (#​5850, #​5855, #​5857)
    • More information on this is available in ADR-44
  • Multi-get directly from a stream (#​5107)
    • More information on this is available in ADR-31
  • Pedantic mode (#​5245)
    • Ensures that stream and consumer creates or updates will fail if the resulting configuration would differ due to defaults, useful for desired-state configuration
  • Stream ingest rate limiting (#​5796)
    • New max_buffered_size and max_buffered_msgs options in the jetstream block of the server config control how many publishes should be queued before rate-limiting, making it easier to protect the system against Core NATS publishes into JetStream
    • Where a reply subject is provided, rate-limited messages will receive a 429 “Too Many Requests” response and can retry later
  • Support for Nats-Expected-Last-Subject-Sequence-Subject header, customising the subject used when paired with Nats-Expected-Last-Subject-Sequence (#​5281) Thanks to @​cchamplin for the contribution!
  • Ability to move cluster Raft traffic into the asset account instead of using the system account using the new cluster_traffic configuration option (#​5466, #​5947)
  • Ability to specify preferred placement tags or clusters using preferred when issuing stepdown requests to the metaleader, streams or consumers (#​6282, #​6284)
  • Implement strict decoding for JetStream API requests with the new strict option in the jetstream block of the server config (#​5858)
  • JetStream encryption on Windows can now use the TPM for key storage (#​5273)
  • The js_cluster_migrate option can now be configured with a delay, controlling how long before a failure would result in asset migration (#​5903)

Leafnodes

  • Support for TLS First on leafnode connections with the handshake_first option (#​4119, #​5783)

WebSocket

MQTT

Improved

General

  • A graceful shutdown caused by the SIGTERM signal will now return exit code 0 instead of exit code 1 (#​6336)
  • Attempt to prune the publish permissions cache more than once, reducing the chance it can grow beyond the intended size (#​6674)

JetStream

  • Improved the performance of subject tracking with a max messages per subject limit of 1 (#​6688)
Fixed

General

  • Server, cluster and gateway names containing spaces will now be rejected, since these can cause issues (#​5676)

JetStream

  • Message removals due to acks in clustered interest-based or work queue streams are now proposed through Raft (#​6140)
    • Ensures that the removal ordering across all replicas is consistent, but may increase the amount of replication traffic
  • Consistency improvements for the metalayer, streams and consumers (#​6194, #​6485, #​6518)
    • A new leader only starts responding to read/write requests once it's initially up-to-date with its Raft log
    • Also fixes issues where KV creates/updates to a key during leader changes could desync the stream
  • Replicated consumers should no longer skip redeliveries of unacknowledged messages after a leader change (#​6566)
  • Consumer starting sequence is now always respected, except for consumers used for sources/mirrors (#​6253)
  • Recovering from a bad message block checksum when there are meant to be zero messages will now correctly populate the first sequence if the last sequence was known from the stream state (#​6647)
  • A panic when reloading the config to add a dedicated route has been fixed for systems that have no pinned routes and no system account (#​6668)
  • When recovering from filestore blocks, ignore temporary files created as a part of re-compression or re-encryption (#​6684)
Complete Changes

v2.10.29

Compare Source

Changelog

Refer to the 2.10 Upgrade Guide for backwards compatibility notes with 2.9.x.

Go Version
  • 1.24.2
Fixed

JetStream

  • Fix a regression introduced in v2.10.28 which can affect calculating consumer subject interest (#​6845)
  • Consumer state reporting of filtered consumers is now more consistent (#​6835)
  • Raft nodes will now correctly report to the upper layer when a preferred node does not become the leader, fixing some issues where multiple assets can believe they are the leader after a scale-up operation (#​6851)

Monitoring

  • The connz endpoint will now return open connections correctly with state set to all (#​6849)
Complete Changes

v2.10.28

Compare Source

[!IMPORTANT]
This version contains a regression that has since been fixed in 2.10.29. Please upgrade to that version instead.

Changelog

Refer to the 2.10 Upgrade Guide for backwards compatibility notes with 2.9.x.

Go Version
  • 1.24.2
Dependencies
  • github.com/nats-io/nats.go v1.41.2 (#​6805)
  • github.com/nats-io/nkeys v0.4.11 (#​6805)
  • golang.org/x/crypto v0.37.0 (#​6805)
  • golang.org/x/sys v0.32.0 (#​6805)
  • github.com/nats-io/jwt/v2 v2.7.4 (#​6813)
Improved

General

  • The publish permissions cache should now remain under the max allowed size more aggressively with improved pruning (#​6674)
  • It is now possible with service imports to import the same subject from multiple different accounts (#​6704)
  • Updating an account claim with a reduced max connection count no longer causes internal clients to be closed, fixing cases where JetStream assets could become unavailable (#​6785)
  • GOMAXPROCS and GOMEMLIMIT are now reported in both statsz and varz (#​6791)
  • Auth tokens are now redacted in trace-level logs for enhanced security (#​6808)
  • Trapped signals are now logged at notice level instead of debug (#​6800)

JetStream

  • Improved purge performance, particularly for KV PurgeDeletes calls, with optimised code paths for finding last sequences and reducing allocations (#​6801)
  • Improved replicated asset creation performance by campaigning for group leadership more quickly (#​6697)
  • Improved the debug log message when resetting a group WAL after failing to truncate (#​6705)
  • Improved checking for streams that overlap with JS API or system subjects, so that badly-configured streams should not be able to break the API (#​6786)
  • Servers that have been peer-remove'd can now be re-admitted automatically after 5 minutes without a server restart (#​6815)
  • Filestore tombstones for purges are now written asynchronously where possible, improving performance (#​6825)
Fixed

General

  • Fix a possible panic when a subject transform has missing tokens (#​6612)
  • Fix a possible panic when adding dedicated routes during a configuration reload (#​6668)
  • Data race when shutting down eventing has been resolved (#​6620)
  • A deadlock when updating account claims with service imports/exports has now been fixed (#​6726)
  • The jsz monitoring endpoint now correctly paginates with offset (#​6794, #​6816)

JetStream

  • JetStream is no longer incorrectly disabled when specifying --js and --store_dir on the command line and then issuing a configuration reload (#​6609)
  • Correctly remove messages from an interest-based stream when using AckAll consumers (#​6587)
  • Preserve the first sequence when rebuilding state due to invalid checksums with no remaining messages (#​6647)
  • When recovering from disk, ignore temporary files that can be created during stream compression so that the same blocks do not get loaded more than once (#​6684)
  • Do not incorrectly reset group WALs when a new leader sends matching term information after a snapshot (#​6691)
  • Corrected a regression in the memory store when purging, aligning it with the filestore behaviour (#​6714)
  • When issuing a peer remove on a stream, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers (#​6720)
  • When issuing a peer remove on a consumer, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers (#​6727)
  • A race condition that could result in observer nodes becoming incorrectly elected as a group leader has been fixed when using leafnodes with shared system accounts (#​6730)
  • Ensure that duplicate Raft groups are not created for the same asset during a restart (#​6732)
  • Allow the use of the extended consumer create API when combining service imports/exports and limited API permissions (#​6759)
  • Streams with the FirstSeq configured are no longer incorrectly purged after a restart if the stream first sequence still matches the configured first sequence (#​6753)
  • Correctly write tombstones when purging and compacting, fixing a bug that could result in some deleted messages returning if the stream index had to be rebuilt (#​6685)
  • The memory store no longer leaks memory tracking deleted sequences after a full stream purge (#​6769)
  • Correctly handle acks for subjects that include a @ character (#​6777)
  • Avoid losing stream sequence numbers of the server is interrupted by generating a new last message block before removing the final remaining block, particularly noticeable with WQ or interest retention policies (#​6778)
  • Use the correct floor when using AckAll in R1 consumers (#​6790)
  • Preserve consumer state when a stream needs to be reset due to a failed catchup (#​6796)
  • Correctly enforce the 32MB maximum publish size limit into JetStream, avoiding filestore corruption from overflowing the maximum record length (#​6798)
  • Push consumers are no longer incorrectly marked as inactive after a delivery failure if there is continued interest (#​6807)
  • Internal clients for JetStream are no longer closed unexpectedly after updating an expired account claim (#​6817)
  • Fixed a panic that could potentially occur when starting clustered consumers when the metalayer is shutting down (#​6823)
  • Fixed a bug in subject tree intersection that could miss some subjects when looking for first matching messages matching FilterSubjects (#​6828, #​6827)

Gateways

  • Fixed a bug that could result in a lost queue subscriptions on gateway connections after a restart or a remote unsubscribe (#​6607)
Complete Changes

v2.10.27

Compare Source

Changelog

Go Version
  • 1.24.1
CVEs
  • This release contains fixes for CVE-2025-30215, a CRITICAL severity vulnerability affecting all NATS Server versions from v2.2.0, prior to v2.11.1 or v2.10.27.
Fixed

JetStream

  • Correctly validate the calling account on a number of system API calls
  • Check system and account limits when processing a stream restore
  • Fixed a performance regression when using max messages per subject of 1 (#​6688)
Complete Changes
nats-io/nats.go (github.com/nats-io/nats.go)

v1.47.0

Compare Source

Changelog

ADDED
  • Core NATS:
FIXED
  • Core NATS:
    • Capture async callbacks before pushing on dispatch queue (#​1955)
  • Object Store:
    • Fixed data race when cancelling context while getting object (#​1949)
  • JetStream:
    • Fixed double channel close on simultaneous Stop and Drain (#​1953)
IMPROVED
  • Clarify MessagesContext.Next() doc (#​1951)
Complete Changes

v1.46.1

Compare Source

Changelog

FIXED
  • JetStream:
    • Add omitempty to AllowMsgTTL and AllowMsgCounter (#​1947)
Complete Changes

v1.46.0

Compare Source

Changelog

Overview

This release enables features introduced in nats-server@v2.12.0.

Some features, while enabled in the client by adding relevant configuration, have APIs exposed in synadia-io/orbit.go, namely:

ADDED
  • JetStream:
    • Stream counters configuration option (#​1932, #​1939)
    • New fields in ClusterInfo (#​1935)
    • AllowAtomicPublish stream configuration option (#​1940)
    • PersistMode stream config option for configurable stream persistence settings (#​1943)
    • AllowMsgSchedules stream configuration option to enable message scheduling (#​1942)
    • Context and timeout options to Messages.Next() plus Fetch context support (#​1938)
    • Support custom name prefix for ordered consumers (#​1928)
    • Prioritized priority policy (#​1937)
  • KeyValue:
    • Added KeyValue bucket metadada support (#​1944)
IMPROVED
  • JetStream:
    • Add max consumers limit error (code=10026). Thanks @​Arlet2 for the contribution (#​1922)
    • Return more specific cons info error on ordered consumer recreation (#​1931)
Complete Changes

v1.45.0

Compare Source

Changelog

ADDED
  • Core NATS:
    • Handling for maximum account active connections exceeded (#​1921)
  • JetStream:
    • WithExpectLastSequenceForSubject publish option (#​1920)
FIXED
  • Core NATS:
    • Track delivered count and auto-unsubscribe for channel subscriptions (#​1913)
    • Clear status listeners map on SubscriptionClosed event to prevent race condition (#​1914)
    • Call ReconnectErrHandler for initial connection failures with RetryOnFailedConnect (#​1915)
  • JetStream:
    • CreateOrUpdateStream preserves domain prefix during updates (#​1917)
    • Handle empty response when creating a consumer (#​1912)
IMPROVED
  • KeyValue:
    • Add test checking KV TTL watcher updates (#​1916)
Complete Changes

v1.44.0

Compare Source

Changelog

Overview

This PR adds a PushConsumer implementation to jetstream, allowing easier migration to new API while maintaining usage of push consumers. For now it only supports the callback-based Consume(), more consuming options will be added in future releases.

ADDED
  • Core NATS:
    • UserCredentialBytes() Conn option (#​1877)
  • JetStream:
    • PushConsumer implementation in jetstream package
    • Expose ClientTrace in JetStreamOptions (#​1886)
  • Service API:
    • Expose WithEndpointPendingLimits option (#​1899)
  • Legacy KeyValue:
    • Error() method to KeyLister and KeyWatcher interfaces (#​1889)
FIXED
  • Core NATS:
    • Fix timeoutWriter not recovering after first error (#​1896)
  • JetStream:
    • Consumer.Next() hangs after connection is closed (#​1883)
    • Fixed stream info request for strict mode (#​1887)
    • Ordered consumer not closing on connection close (#​1885)
    • Return a more appropriate error when Subject Transform is not supported (#​1416)
    • Fix subject transform comparison. Thanks @​erikmansson for the contribution (#​1907)
  • Legacy JetStream:
    • Use timeout from JetStreamContext if no deadline is set on ctx (#​1909)
  • KeyValue:
    • Keys() and ListKeys() returning duplicates (#​1884)
    • Fix subject prefix for the Create/Update operation in KV store. Thanks @​SalvaChiLlo for the contribution (#​1903)
CHANGED
  • Change DefaultSubPendingMsgsLimit (#​998)
Complete Changes

v1.43.0

Compare Source

Changelog

ADDED
  • Core NATS:
    • Add nc.LocalAddr, similar to nc.ConnectedAddr (#​1877)
FIXED
  • Service API:
    • Fix stopping service not unsubscribing from all endpoints. Thanks @​arunsworld for the contribution (#​1872)
    • Remove fmt.Println from Service.Stop() (#​1880)
  • Legacy KeyValue:
    • Fix possible race setting timer in kv.WatchFiltered (#​1879)
Complete Changes

v1.42.0

Compare Source

Changelog

Overview

This release adds per-key TTL functionality to key-value stores. It adds:

  1. LimitMarkerTTL config option to enable automatic tombstone deletion.
  2. KeyTTL option to kv.Create()
  3. PurgeTTL() option to kv.Purge()
ADDED
  • KeyValue:
    • Added KeyValue per key TTL support and limit markers (#​1864)
Complete Changes

v1.41.2

Compare Source

Changelog

ADDED
  • Core NATS:
    • Add nc.RemoveStatusListener() method (#​1856)
FIXED
  • Legacy JetStream:
    • Fix Fetch and FetchBatch memory leak (#​1856)
  • Legacy KeyValue:
    • Use context in when purging stream in kv.PurgeDeletes() (#​1858)
  • Bump golang.org/x/crypto to fix vulnerability (#​1857)
Complete Changes

v1.41.1

Compare Source

Changelog

FIXED
  • ObjectStore:
    • Use default timeout for ObjectStore.Get when no deadline is set on ctx (#​1850)
IMPROVED
  • Remove golang.org/x/text dependency (#​1849)
Complete Changes

v1.41.0

Compare Source

Changelog

Overview

This release adds consumer priority groups to JetStream, exposing overflow and pinning policies. For more information on consumer priority groups, see ADR-42.

Added
  • JetStream:
    • Consumer priority groups with pinned and overflow policies (#​1826)
    • WithDefaultTimeout option for JetStream API requests (#​1843)
Fixed
  • KeyValue:
    • Ensure timer is stopped when watcher is stopped (#​1838)
  • ObjectStore:
    • Ensure object watcher stop closes the updates channel (#​1844)
  • Core NATS:
    • Data race when reading current status in sub.StatusChanged and nc.StatusChanged (#​1841)
    • Reset channel after closing in ForceReconnect to avoid panic on subsequent ForceReconnect calls (#​1842, #​1846)
Changed
Improved
  • Legacy JetStream:
    • Cancel Fetch and FetchBatch on reconnect (#​1840)
  • JetStream:
    • Invalid default in documentation for OrderedConsumerConfig.InactiveThreshold (#​1845)
  • KeyValue:
    • Stop the watcher before performing the purge operations for PurgeDeletes (#​1839)
Complete Changes

v1.40.1

Compare Source

Changelog

Overview

This release fixes an issue in legacy JetStream Subscribe which did not respect user-set context when creating a consumer.

FIXED
  • Legacy JetStream:
    • Set context from option when creating consumer in js.Subscribe (#​1835)
Complete Changes

v1.40.0

Compare Source

Changelog

Overview

This release focuses on adding support for new features from NATS Server v2.11.0. This includes:

  • Per message TTLs
  • Consumer pause and resume

Batch direct get will be released in orbit. Support for consumer priority groups will be added in the next minor release.

Added
  • JetStream:
    • Pause and resume JetStream consumer. Thanks @​yordis for the contribution (#​1571)
    • Per message TTL option for JetStream publish (#​1825)
    • Timeout option for async publish (#​1819)
  • Service API
    • Support for disabling queue groups at service, group, and endpoint levels (#​1797)
  • Core NATS:
    • ReconnectErrCB for handling failed reconnect attempts in a callback. Thanks @​sschleemilch for the contribution (#​1804)
Fixed
  • JetStream
    • Invalid subscription on ordered consumer in leaderless cluster (#​1808)
    • Ordered consumer not restarting on no responders (#​1827)
    • Avoid ack id collision in PublishAsync (#​1812)
    • Possible panic in Consumer.Fetch (#​1828)
    • Use resp.Error to show NATS error in deleteMsg. Thanks @​imariman for the contribution (#​1822)
  • KeyValue
    • Deadlock when fetching keys from KV while messages are deleted/purged (#​1824)
Changed
  • Bump go version to 1.23 and update dependencies (#​1821)
Complete Changes
stretchr/testify (github.com/stretchr/testify)

v1.11.1

Compare Source

This release fixes #​1785 introduced in v1.11.0 where expected argument values implementing the stringer interface (String() string) with a method which mutates their value, when passed to mock.Mock.On (m.On("Method", <expected>).Return()) or actual argument values passed to mock.Mock.Called may no longer match one another where they previously did match. The behaviour prior to v1.11.0 where the stringer is always called is restored. Future testify releases may not call the stringer method at all in this case.

What's Changed

Full Changelog: https://github.com/stretchr/testify/compare/v1.11.0...v1.11.1

v1.11.0

Compare Source

What's Changed

Functional Changes

v1.11.0 Includes a number of performance improvements.

Fixes
Documentation, Build & CI

New Contributors

Full Changelog: https://github.com/stretchr/testify/compare/v1.10.0...v1.11.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) | require | minor | `v2.10.26` -> `v2.12.2` | | [github.com/nats-io/nats.go](https://github.com/nats-io/nats.go) | require | minor | `v1.39.1` -> `v1.47.0` | | [github.com/stretchr/testify](https://github.com/stretchr/testify) | require | minor | `v1.10.0` -> `v1.11.1` | | [go](https://go.dev/) ([source](https://github.com/golang/go)) | toolchain | minor | `1.24.1` -> `1.25.5` | --- ### Release Notes <details> <summary>nats-io/nats-server (github.com/nats-io/nats-server/v2)</summary> ### [`v2.12.2`](https://github.com/nats-io/nats-server/releases/tag/v2.12.2) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.12.1...v2.12.2) #### Changelog Refer to the [2.12 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_212) for backwards compatibility notes with 2.11.x. ##### Go Version - 1.25.4 ([#&#8203;7520](https://github.com/nats-io/nats-server/issues/7520)) ##### Dependencies - github.com/klauspost/compress v1.18.1 ([#&#8203;7474](https://github.com/nats-io/nats-server/issues/7474)) - github.com/nats-io/nats.go v1.47.0 ([#&#8203;7474](https://github.com/nats-io/nats-server/issues/7474)) - golang.org/x/sys v0.38.0 ([#&#8203;7538](https://github.com/nats-io/nats-server/issues/7538)) - github.com/minio/highwayhash [`070ab1a`](https://github.com/nats-io/nats-server/commit/070ab1a) ([#&#8203;7539](https://github.com/nats-io/nats-server/issues/7539)) ##### Added General - Support for the PROXY protocol (v1 and v2) for client connections, when `proxy_protocol: true` is set in the config ([#&#8203;7456](https://github.com/nats-io/nats-server/issues/7456)) JetStream - Added `meta_compact` and `meta_compact_size`, advanced JetStream config options to control how many log entries must be present in the metalayer log before snapshotting and compaction takes place ([#&#8203;7484](https://github.com/nats-io/nats-server/issues/7484), [#&#8203;7521](https://github.com/nats-io/nats-server/issues/7521)) - Added `write_timeout` option for clients, routes, gateways and leafnodes which controls the behaviour on reaching the `write_deadline`, values can be `default`, `retry` or `close` ([#&#8203;7513](https://github.com/nats-io/nats-server/issues/7513)) Monitoring - Added expvar `/debug/vars` endpoint to the monitoring port ([#&#8203;7469](https://github.com/nats-io/nats-server/issues/7469)) - Meta cluster snapshot statistics have been added to the `/jsz` endpoint ([#&#8203;7524](https://github.com/nats-io/nats-server/issues/7524)) - The `/jsz` endpoint can now show direct consumers with the `direct-consumers?true` flag ([#&#8203;7543](https://github.com/nats-io/nats-server/issues/7543)) ##### Improved General - Binary stream snapshots are now preferred by default for nodes on new route connections ([#&#8203;7479](https://github.com/nats-io/nats-server/issues/7479)) - Reduced allocations in the sublist and subject transforms ([#&#8203;7519](https://github.com/nats-io/nats-server/issues/7519)) JetStream - Improved the logging for observer mode ([#&#8203;7433](https://github.com/nats-io/nats-server/issues/7433)) - Improve interest detection when consumers are created or deleted across different servers ([#&#8203;7440](https://github.com/nats-io/nats-server/issues/7440)) - Improved the performance of enforcing `max_bytes` and `max_msgs` limits ([#&#8203;7455](https://github.com/nats-io/nats-server/issues/7455)) - Streams and consumers will no longer unnecessarily snapshot when being removed or scaling down ([#&#8203;7495](https://github.com/nats-io/nats-server/issues/7495)) - Streams are now loaded in parallel when enabling JetStream, often reducing the time it takes to start up the server ([#&#8203;7482](https://github.com/nats-io/nats-server/issues/7482), [#&#8203;7526](https://github.com/nats-io/nats-server/issues/7526)) - Log lines and errors related to offline/unsupported assets are now clearer ([#&#8203;7416](https://github.com/nats-io/nats-server/issues/7416), [#&#8203;7425](https://github.com/nats-io/nats-server/issues/7425)) - Stream catchups will now use delete ranges more aggressively, speeding up catchups of large streams with many interior deletes ([#&#8203;7512](https://github.com/nats-io/nats-server/issues/7512)) - Streams with subject transforms can now implicitly republish based on those transforms by configuring `>` for both republish source and destination ([#&#8203;7515](https://github.com/nats-io/nats-server/issues/7515)) - A race condition where subscriptions may not be set up before catchup requests are sent after a leader change has been fixed ([#&#8203;7518](https://github.com/nats-io/nats-server/issues/7518)) - Reduced heap allocations in hash checks ([#&#8203;7539](https://github.com/nats-io/nats-server/issues/7539)) - Healthchecks now correctly report when streams are catching up, instead of showing them as unhealthy ([#&#8203;7535](https://github.com/nats-io/nats-server/issues/7535)) - Potentially reduced the number of calls to the account resolver for assets that are not resident on that server ([#&#8203;7537](https://github.com/nats-io/nats-server/issues/7537)) ##### Fixed General - When using message tracing, header corruption when setting the hop header has been fixed ([#&#8203;7443](https://github.com/nats-io/nats-server/issues/7443)) - Fixed a bug when validating leafnode proxies ([#&#8203;7444](https://github.com/nats-io/nats-server/issues/7444)) - Fixed a regression where token authentication would not be parsed correctly in leafnode URLs ([#&#8203;7452](https://github.com/nats-io/nats-server/issues/7452)) - Gateway subscribe/unsubscribe will no longer block on account fetches ([#&#8203;7449](https://github.com/nats-io/nats-server/issues/7449)) - Shutting down a server using lame-duck mode should no longer result in max connection exceeded errors ([#&#8203;7527](https://github.com/nats-io/nats-server/issues/7527)) JetStream - Caches will now no longer expire unnecessarily when re-reading the same sequences multiple times in first-matching code paths ([#&#8203;7435](https://github.com/nats-io/nats-server/issues/7435)) - Fixed a bug in atomic batching where the incorrect field would be checked when looking for unsupported headers ([#&#8203;7436](https://github.com/nats-io/nats-server/issues/7436)) - Fixed a deadlock that could happen when interleaving a direct get request with a batch write ([#&#8203;7458](https://github.com/nats-io/nats-server/issues/7458)) - A couple of issues related to header handling have been fixed ([#&#8203;7465](https://github.com/nats-io/nats-server/issues/7465)) - No-wait requests now return a 400 No Messages response correctly if the stream is empty ([#&#8203;7466](https://github.com/nats-io/nats-server/issues/7466)) - Raft groups will now only report leadership status after a no-op entry on recovery ([#&#8203;7460](https://github.com/nats-io/nats-server/issues/7460)) - Fixed a race condition in the filestore that could happen between storing messages and shutting down ([#&#8203;7496](https://github.com/nats-io/nats-server/issues/7496)) - A panic that could occur when recovering streams in parallel has been fixed ([#&#8203;7503](https://github.com/nats-io/nats-server/issues/7503)) - An off-by-one when detecting holes at the end of a filestore block has been fixed ([#&#8203;7508](https://github.com/nats-io/nats-server/issues/7508)) - Indexing a message block in the filestore no longer tries to adjust the cache first sequence ([#&#8203;7508](https://github.com/nats-io/nats-server/issues/7508)) - Writing skip message records in the filestore no longer releases and reacquires the lock unnecessarily ([#&#8203;7508](https://github.com/nats-io/nats-server/issues/7508)) - Writing message records only overwrites the cache first sequence on the first indexed write ([#&#8203;7508](https://github.com/nats-io/nats-server/issues/7508)) - Fixed a bug on metalayer recovery where stream and consumer monitor goroutines for recreated assets would run with the wrong Raft group ([#&#8203;7510](https://github.com/nats-io/nats-server/issues/7510)) - Scaling up an asset from R1 now results in an installed snapshot, allowing recovery after restart if interrupted, avoiding a potential desync ([#&#8203;7509](https://github.com/nats-io/nats-server/issues/7509)) - Raft groups should no longer report no quorum incorrectly when shutting down ([#&#8203;7522](https://github.com/nats-io/nats-server/issues/7522)) - Consumers that existed in a metalayer snapshot but were deleted on recovery will no longer result in failing healthchecks ([#&#8203;7523](https://github.com/nats-io/nats-server/issues/7523)) - An off-by-one when detecting holes at the end of a filestore block has been fixed ([#&#8203;7525](https://github.com/nats-io/nats-server/issues/7525)) - Fixed a race condition that could happen with shutdown signals when shutting down JetStream ([#&#8203;7536](https://github.com/nats-io/nats-server/issues/7536)) - Fixed an issue in the filestore where skipping message sequences did not correctly update the cache accounting ([#&#8203;7534](https://github.com/nats-io/nats-server/issues/7534)) - Fixed a deadlock that could occur when purging a stream with mismatched consumer state ([#&#8203;7546](https://github.com/nats-io/nats-server/issues/7546)) ##### Complete Changes ### [`v2.12.1`](https://github.com/nats-io/nats-server/releases/tag/v2.12.1) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.12.0...v2.12.1) #### Changelog Refer to the [2.12 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_212) for backwards compatibility notes with 2.11.x. ##### Go Version - 1.25.3 ([#&#8203;7428](https://github.com/nats-io/nats-server/issues/7428)) ##### Dependencies - github.com/google/go-tpm v0.9.6 ([#&#8203;7374](https://github.com/nats-io/nats-server/issues/7374)) - github.com/nats-io/nats.go v1.46.0 ([#&#8203;7374](https://github.com/nats-io/nats-server/issues/7374)) - golang.org/x/crypto v0.43.0 ([#&#8203;7423](https://github.com/nats-io/nats-server/issues/7423)) - golang.org/x/sys v0.37.0 ([#&#8203;7423](https://github.com/nats-io/nats-server/issues/7423)) - golang.org/x/time v0.14.0 ([#&#8203;7423](https://github.com/nats-io/nats-server/issues/7423)) ##### Added General - The `NewServerFromConfig` function has been added to the embedded server API for parsing an external configuration file when `ConfigFile` is supplied ([#&#8203;7364](https://github.com/nats-io/nats-server/issues/7364)) - WebSocket leafnode connections can now use a HTTP proxy by specifying `proxy` settings in the leafnode `remotes` ([#&#8203;7242](https://github.com/nats-io/nats-server/issues/7242)) - The `write_deadline` option in the `cluster`, `leafnode` and `gateway` config blocks allows configuring write deadlines on a finger-grained basis ([#&#8203;7405](https://github.com/nats-io/nats-server/issues/7405)) ##### Improved Monitoring - The `jsz` monitoring endpoint can now report leader counts ([#&#8203;7429](https://github.com/nats-io/nats-server/issues/7429)) JetStream - The store lock is no longer held while searching for TTL expiry tasks, improving performance ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Removing a message from the TTL state is now faster ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - The filestore no longer performs heap allocations for hash checks ([#&#8203;7345](https://github.com/nats-io/nats-server/issues/7345)) - The filestore now reuses pooled write cache allocations more efficiently ([#&#8203;7346](https://github.com/nats-io/nats-server/issues/7346)) - Meta snapshot performance for a very large number of assets has been improved after a regression in v2.11.9 ([#&#8203;7350](https://github.com/nats-io/nats-server/issues/7350)) - Sequence-from-timestamp lookups, such as those using `opt_start_time` on consumers or `start_time` on message get requests, now use a binary search for improved lookup performance ([#&#8203;7357](https://github.com/nats-io/nats-server/issues/7357)) - Scheduled messages are now deactivated properly when followed up with another message on the same subject without a schedule ([#&#8203;7366](https://github.com/nats-io/nats-server/issues/7366)) - Meta snapshots are no longer taken on every stream removal ([#&#8203;7373](https://github.com/nats-io/nats-server/issues/7373)) - Filestore cache lookups can now return early for empty blocks ([#&#8203;7381](https://github.com/nats-io/nats-server/issues/7381)) - Filestore meta files are now written using temporary staging, avoiding accidental truncation on crashes ([#&#8203;7388](https://github.com/nats-io/nats-server/issues/7388)) - Atomic batch publish now supports deduplication with the `Nats-Msg-Id` header ([#&#8203;7391](https://github.com/nats-io/nats-server/issues/7391)) - Cache-specific log lines in the filestore have been improved ([#&#8203;7396](https://github.com/nats-io/nats-server/issues/7396)) - Log lines and errors related to offline/unsupported assets are now clearer ([#&#8203;7416](https://github.com/nats-io/nats-server/issues/7416), [#&#8203;7425](https://github.com/nats-io/nats-server/issues/7425)) ##### Fixed General - Fixed the exit code when receiving a `SIGTERM` signal immediately after startup ([#&#8203;7367](https://github.com/nats-io/nats-server/issues/7367)) - The `$SYS.REQ.CLAIMS.DELETE` endpoint now correctly strips headers, like the `$SYS.REQ.CLAIMS.UPDATE` endpoint already does ([#&#8203;7413](https://github.com/nats-io/nats-server/issues/7413)) - Log lines generated when reloading trusted proxies now report the correct keys ([#&#8203;7427](https://github.com/nats-io/nats-server/issues/7427)) JetStream - Batch check now uses the correct subject instead of the last subject that does the commit ([#&#8203;7342](https://github.com/nats-io/nats-server/issues/7342)) - Removed messages with a per-message TTL are now removed from the TTL state immediately ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Fixed a bug where TTL state was recovered on startup with subject delete markers enabled, that message expiry would not start as expected ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Expiring messages from the filestore no longer leaks timers and expires at the correct time ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Fixed a bug where scheduled messages would not trigger correctly after recovery ([#&#8203;7347](https://github.com/nats-io/nats-server/issues/7347)) - Deleting a non-existent sequence on a stream no longer results in a cluster reset and leadership election ([#&#8203;7348](https://github.com/nats-io/nats-server/issues/7348)) - Subject tree intersection now correctly handles overlapping literals and partial wildcards, i.e. `stream.A` and `stream.*.A`, fixing some consumer or message get filters ([#&#8203;7349](https://github.com/nats-io/nats-server/issues/7349)) - A data race when checking all JetStream limits has been fixed ([#&#8203;7356](https://github.com/nats-io/nats-server/issues/7356)) - Raft will no longer trigger a reset of the clustered state due to a stream snapshot timeout ([#&#8203;7293](https://github.com/nats-io/nats-server/issues/7293)) - Atomic batches now reject unsupported commits ([#&#8203;7368](https://github.com/nats-io/nats-server/issues/7368)) - Race conditions and potential panics fixed in the handling of some JetStream API handlers ([#&#8203;7380](https://github.com/nats-io/nats-server/issues/7380)) - The filestore no longer loses tombstones when using secure erase ([#&#8203;7384](https://github.com/nats-io/nats-server/issues/7384)) - The filestore no longer loses the last sequence when recovering blocks containing only tombstones ([#&#8203;7384](https://github.com/nats-io/nats-server/issues/7384)) - The filestore now correctly cleans up empty blocks when selecting the next first block ([#&#8203;7384](https://github.com/nats-io/nats-server/issues/7384)) - The filestore now correctly obeys `sync_always` for writing TTL and scheduling state files ([#&#8203;7385](https://github.com/nats-io/nats-server/issues/7385)) - The filestore will now correctly expire a cache when the wrong sequence is found ([#&#8203;7396](https://github.com/nats-io/nats-server/issues/7396)) - Fixed a data race on a wait group when mirroring streams ([#&#8203;7395](https://github.com/nats-io/nats-server/issues/7395)) - Skipped message sequences are now checked for ordering before apply, fixing a potential stream desync on catchups ([#&#8203;7400](https://github.com/nats-io/nats-server/issues/7400)) - Skipped message sequences now correctly detect gaps from erased message slots, fixing potential cache issues, slow reads and issues with catchups ([#&#8203;7399](https://github.com/nats-io/nats-server/issues/7399), [#&#8203;7401](https://github.com/nats-io/nats-server/issues/7401)) - Raft groups now report peer activity more consistently, fixing some cases where asset info and monitoring endpoints may report misleading values after leader changes ([#&#8203;7402](https://github.com/nats-io/nats-server/issues/7402)) - Raft groups will no longer permit truncations from unexpected catchup entries if the catchup is completed ([#&#8203;7424](https://github.com/nats-io/nats-server/issues/7424)) - The filestore will now correctly release locks when erasing messages returns an error ([#&#8203;7431](https://github.com/nats-io/nats-server/issues/7431)) ##### Complete Changes ### [`v2.12.0`](https://github.com/nats-io/nats-server/releases/tag/v2.12.0) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.11...v2.12.0) #### Changelog Refer to the [2.12 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_212) for backwards compatibility notes with 2.11.x. ##### Go Version - 1.25.1 ([#&#8203;7273](https://github.com/nats-io/nats-server/issues/7273)) ##### Added General - Exponential backoff on route/gateway reconnection attempts ([#&#8203;7042](https://github.com/nats-io/nats-server/issues/7042), [#&#8203;7048](https://github.com/nats-io/nats-server/issues/7048)) - Added `allow_insecure_cipher_suites` configuration option to `tls` block, as insecure ciphers are now disabled by default ([#&#8203;7144](https://github.com/nats-io/nats-server/issues/7144)) - Added `X25519MLKEM768` option to the TLS curve preferences ([#&#8203;7280](https://github.com/nats-io/nats-server/issues/7280)) - No responders errors from the server now include the original subject in the `Nats-Subject` header ([#&#8203;5250](https://github.com/nats-io/nats-server/issues/5250)) - Added `exact_match` field to the filtering of various monitoring endpoints for server name, host or cluster matching ([#&#8203;7260](https://github.com/nats-io/nats-server/issues/7260)) JetStream - Atomic batch publishes ([#&#8203;6966](https://github.com/nats-io/nats-server/issues/6966), [#&#8203;7057](https://github.com/nats-io/nats-server/issues/7057), [#&#8203;7060](https://github.com/nats-io/nats-server/issues/7060), [#&#8203;7085](https://github.com/nats-io/nats-server/issues/7085), [#&#8203;7090](https://github.com/nats-io/nats-server/issues/7090), [#&#8203;7091](https://github.com/nats-io/nats-server/issues/7091), [#&#8203;7119](https://github.com/nats-io/nats-server/issues/7119), [#&#8203;7152](https://github.com/nats-io/nats-server/issues/7152), [#&#8203;7175](https://github.com/nats-io/nats-server/issues/7175), [#&#8203;7274](https://github.com/nats-io/nats-server/issues/7274), [#&#8203;7294](https://github.com/nats-io/nats-server/issues/7294), [#&#8203;7313](https://github.com/nats-io/nats-server/issues/7313), [#&#8203;7314](https://github.com/nats-io/nats-server/issues/7314), [#&#8203;7311](https://github.com/nats-io/nats-server/issues/7311), [#&#8203;7316](https://github.com/nats-io/nats-server/issues/7316), [#&#8203;7321](https://github.com/nats-io/nats-server/issues/7321), [#&#8203;7322](https://github.com/nats-io/nats-server/issues/7322), [#&#8203;7327](https://github.com/nats-io/nats-server/issues/7327), [#&#8203;7330](https://github.com/nats-io/nats-server/issues/7330)) - Stage-and-commit style batches for JetStream message publishes with normal consistency checks - ADR: https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-50.md - Counter streams ([#&#8203;6973](https://github.com/nats-io/nats-server/issues/6973), [#&#8203;6988](https://github.com/nats-io/nats-server/issues/6988), [#&#8203;7081](https://github.com/nats-io/nats-server/issues/7081), [#&#8203;7118](https://github.com/nats-io/nats-server/issues/7118)) - Counters are incremented or decremented by publishing to the stream with `Nats-Incr` headers, with full aggregate consistency over sources and mirrors - ADR: https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-49.md - Prioritised mode for consumer priority groups ([#&#8203;7113](https://github.com/nats-io/nats-server/issues/7113)) - Allows for low-latency switching between clients based on the priority set - ADR: https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-42.md - Support for trusted proxies ([#&#8203;7153](https://github.com/nats-io/nats-server/issues/7153)) - Allows enforcing that connections arrive via a NATS protocol-aware proxy - ADR: https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-55.md - Added the ability to promote mirrors to normal streams by removing the mirror configuration ([#&#8203;7171](https://github.com/nats-io/nats-server/issues/7171)) - This allows a mirror to take over operation if the original stream is lost, for example in a disaster recovery scenario - This operation cannot be undone and also requires configuring the stream subjects to continue operation - Added delayed message scheduling ([#&#8203;7170](https://github.com/nats-io/nats-server/issues/7170), [#&#8203;7245](https://github.com/nats-io/nats-server/issues/7245), [#&#8203;7319](https://github.com/nats-io/nats-server/issues/7319)) - Implements single schedule messages using the `Nats-Schedule-TTL` message header - ADR: https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-51.md - Added support for offline assets ([#&#8203;7158](https://github.com/nats-io/nats-server/issues/7158)) - Streams and consumers from a higher API version or using unsupported features (i.e. after a downgrade) will be marked as offline to prevent corruption - ADR: https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-44.md - Added `partition(n)` for deterministic hash-based partitioning and `random(n)` for non-deterministic random partitioning to subject transforms ([#&#8203;6950](https://github.com/nats-io/nats-server/issues/6950)) - Added the ability to specify the required API level in JetStream API requests with the `Nats-Required-Api-Level` request header ([#&#8203;7157](https://github.com/nats-io/nats-server/issues/7157)) - Added the ability for streams to opt into async writes ([#&#8203;7315](https://github.com/nats-io/nats-server/issues/7315), [#&#8203;7323](https://github.com/nats-io/nats-server/issues/7323)) - Add `server_metadata` block to server config, allowing arbitrary key-pairs to be set on a per-server basis, similar to stream/consumer metadata ([#&#8203;6935](https://github.com/nats-io/nats-server/issues/6935)) - Support for empty votes, which improves how the Raft election logic handles nodes that have lost their stable storage and attempt to rejoin the cluster regardless ([#&#8203;7038](https://github.com/nats-io/nats-server/issues/7038)) - Added `"leader_since"` to the stream and consumer info responses ([#&#8203;7189](https://github.com/nats-io/nats-server/issues/7189)) Leafnodes - Added the ability to isolate leafnode subject interest propagation with the hub-side `isolate_leafnode_interest` configuration option, suppressing east-west traffic and reducing subscription overheads when there are many leafnodes ([#&#8203;7238](https://github.com/nats-io/nats-server/issues/7238), [#&#8203;7243](https://github.com/nats-io/nats-server/issues/7243), [#&#8203;7277](https://github.com/nats-io/nats-server/issues/7277)) - Added `disabled` option for leafnode remotes, with support for reloading from the config at runtime ([#&#8203;7054](https://github.com/nats-io/nats-server/issues/7054)) ##### Changed General - WebSocket and MQTT clients no longer use TCP keepalives ([#&#8203;7329](https://github.com/nats-io/nats-server/issues/7329)) JetStream - The JetStream API level has been increased to `2` ([#&#8203;6969](https://github.com/nats-io/nats-server/issues/6969)) - The API surface is now in strict mode by default, erroring if unknown fields are provided in the request body ([#&#8203;7049](https://github.com/nats-io/nats-server/issues/7049)) - Replicated streams will now default to async flush as long as `sync: always` is not configured ([#&#8203;7018](https://github.com/nats-io/nats-server/issues/7018), [#&#8203;7163](https://github.com/nats-io/nats-server/issues/7163)) - The default value for `max_buffered_msgs` has been increased by 10x to 100,000 messages ([#&#8203;6633](https://github.com/nats-io/nats-server/issues/6633)) ##### Improved General - When logging closed connections, the remote is now logged if known, making it easier to identify where route/gateway/leafnode connections have dropped ([#&#8203;7077](https://github.com/nats-io/nats-server/issues/7077)) - Client-specific log lines now include the account and user if known ([#&#8203;7079](https://github.com/nats-io/nats-server/issues/7079)) JetStream - Raft nodes will no longer respond success to catchup messages and will ignore responses if not leader, fixing some potential stream desync scenarios ([#&#8203;6944](https://github.com/nats-io/nats-server/issues/6944)) - Replicated streams can now be created even if some of the replica nodes are offline ([#&#8203;7075](https://github.com/nats-io/nats-server/issues/7075)) - The storage type is now logged when logging resource limits exceeded ([#&#8203;7076](https://github.com/nats-io/nats-server/issues/7076)) - JetStream API requests are always handled from the worker pool, improving the semantics of the API request queue and logging when requests take too long ([#&#8203;7125](https://github.com/nats-io/nats-server/issues/7125)) - Filestore in-memory caches now use weak pointers and can respond to garbage collector (GC) pressure, which should help to avoid a number of possible out-of-memory scenarios ([#&#8203;7180](https://github.com/nats-io/nats-server/issues/7180)) - Filestore buffer reuse has been fixed ([#&#8203;7295](https://github.com/nats-io/nats-server/issues/7295)) - Raft will no longer send any append entries in a known non-leader state ([#&#8203;7297](https://github.com/nats-io/nats-server/issues/7297)) - Improved recovery of filestore blocks with unexpected sequence ordering ([#&#8203;7303](https://github.com/nats-io/nats-server/issues/7303), [#&#8203;7304](https://github.com/nats-io/nats-server/issues/7304), [#&#8203;7305](https://github.com/nats-io/nats-server/issues/7305)) - Filestore fixes to improve write correctness, particularly when combined with async mode ([#&#8203;7318](https://github.com/nats-io/nats-server/issues/7318), [#&#8203;7331](https://github.com/nats-io/nats-server/issues/7331)) Leafnodes - Leafnode connections without auth no longer unexpectedly connect to the global account ([#&#8203;7116](https://github.com/nats-io/nats-server/issues/7116)) ##### Fixed JetStream - Improved validation for stream/consumer configs ([#&#8203;7134](https://github.com/nats-io/nats-server/issues/7134)) - An error will now be correctly surfaced when the `Nats-Expected-Last-Subject-Sequence-Subject` header is supplied but the accompanying `Nats-Expected-Last-Subject-Sequence` header is not ([#&#8203;7196](https://github.com/nats-io/nats-server/issues/7196)) OCSP - URL encoding of OCSP requests should now be RFC4648-compliant ([#&#8203;7184](https://github.com/nats-io/nats-server/issues/7184)) ##### Complete Changes ### [`v2.11.11`](https://github.com/nats-io/nats-server/releases/tag/v2.11.11) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.10...v2.11.11) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.25.4 ([#&#8203;7520](https://github.com/nats-io/nats-server/issues/7520)) ##### Dependencies - golang.org/x/crypto v0.43.0 ([#&#8203;7423](https://github.com/nats-io/nats-server/issues/7423)) - golang.org/x/sys v0.37.0 ([#&#8203;7423](https://github.com/nats-io/nats-server/issues/7423)) - golang.org/x/time v0.14.0 ([#&#8203;7423](https://github.com/nats-io/nats-server/issues/7423)) - golang.org/x/sys v0.38.0 ([#&#8203;7538](https://github.com/nats-io/nats-server/issues/7538)) - github.com/minio/highwayhash [`070ab1a`](https://github.com/nats-io/nats-server/commit/070ab1a) ([#&#8203;7539](https://github.com/nats-io/nats-server/issues/7539)) ##### Added JetStream - Added `meta_compact` and `meta_compact_size`, advanced JetStream config options to control how many log entries must be present in the metalayer log before snapshotting and compaction takes place ([#&#8203;7484](https://github.com/nats-io/nats-server/issues/7484), [#&#8203;7521](https://github.com/nats-io/nats-server/issues/7521)) - Added `write_timeout` option for clients, routes, gateways and leafnodes which controls the behaviour on reaching the `write_deadline`, values can be `default`, `retry` or `close` ([#&#8203;7513](https://github.com/nats-io/nats-server/issues/7513)) Monitoring - Meta cluster snapshot statistics have been added to the `/jsz` endpoint ([#&#8203;7524](https://github.com/nats-io/nats-server/issues/7524)) - The `/jsz` endpoint can now show direct consumers with the `direct-consumers?true` flag ([#&#8203;7543](https://github.com/nats-io/nats-server/issues/7543)) ##### Improved General - Binary stream snapshots are now preferred by default for nodes on new route connections ([#&#8203;7479](https://github.com/nats-io/nats-server/issues/7479)) - Reduced allocations in the sublist and subject transforms ([#&#8203;7519](https://github.com/nats-io/nats-server/issues/7519)) JetStream - Improved the logging for observer mode ([#&#8203;7433](https://github.com/nats-io/nats-server/issues/7433)) - Improved the performance of enforcing `max_bytes` and `max_msgs` limits ([#&#8203;7455](https://github.com/nats-io/nats-server/issues/7455)) - Streams and consumers will no longer unnecessarily snapshot when being removed or scaling down ([#&#8203;7495](https://github.com/nats-io/nats-server/issues/7495)) - Streams are now loaded in parallel when enabling JetStream, often reducing the time it takes to start up the server ([#&#8203;7482](https://github.com/nats-io/nats-server/issues/7482)) - Stream catchups will now use delete ranges more aggressively, speeding up catchups of large streams with many interior deletes ([#&#8203;7512](https://github.com/nats-io/nats-server/issues/7512)) - Streams with subject transforms can now implicitly republish based on those transforms by configuring `>` for both republish source and destination ([#&#8203;7515](https://github.com/nats-io/nats-server/issues/7515)) - A race condition where subscriptions may not be set up before catchup requests are sent after a leader change has been fixed ([#&#8203;7518](https://github.com/nats-io/nats-server/issues/7518)) - JetStream recovery parallelism now matches the I/O gated semaphore ([#&#8203;7526](https://github.com/nats-io/nats-server/issues/7526)) - Reduced heap allocations in hash checks ([#&#8203;7539](https://github.com/nats-io/nats-server/issues/7539)) - Healthchecks now correctly report when streams are catching up, instead of showing them as unhealthy ([#&#8203;7535](https://github.com/nats-io/nats-server/issues/7535)) - Improve interest detection when consumers are created or deleted across different servers ([#&#8203;7440](https://github.com/nats-io/nats-server/issues/7440)) Monitoring - The `jsz` monitoring endpoint can now report leader counts ([#&#8203;7429](https://github.com/nats-io/nats-server/issues/7429)) ##### Fixed General - When using message tracing, header corruption when setting the hop header has been fixed ([#&#8203;7443](https://github.com/nats-io/nats-server/issues/7443)) - Shutting down a server using lame-duck mode should no longer result in max connection exceeded errors ([#&#8203;7527](https://github.com/nats-io/nats-server/issues/7527)) JetStream - Race conditions and potential panics fixed in the handling of some JetStream API handlers ([#&#8203;7380](https://github.com/nats-io/nats-server/issues/7380)) - The filestore no longer loses tombstones when using secure erase ([#&#8203;7384](https://github.com/nats-io/nats-server/issues/7384)) - The filestore no longer loses the last sequence when recovering blocks containing only tombstones ([#&#8203;7384](https://github.com/nats-io/nats-server/issues/7384)) - The filestore now correctly cleans up empty blocks when selecting the next first block ([#&#8203;7384](https://github.com/nats-io/nats-server/issues/7384)) - The filestore now correctly obeys `sync_always` for writing TTL and scheduling state files ([#&#8203;7385](https://github.com/nats-io/nats-server/issues/7385)) - Fixed a data race on a wait group when mirroring streams ([#&#8203;7395](https://github.com/nats-io/nats-server/issues/7395)) - Skipped message sequences are now checked for ordering before apply, fixing a potential stream desync on catchups ([#&#8203;7400](https://github.com/nats-io/nats-server/issues/7400)) - Skipped message sequences now correctly detect gaps from erased message slots, fixing potential cache issues, slow reads and issues with catchups ([#&#8203;7399](https://github.com/nats-io/nats-server/issues/7399), [#&#8203;7401](https://github.com/nats-io/nats-server/issues/7401)) - Raft groups now report peer activity more consistently, fixing some cases where asset info and monitoring endpoints may report misleading values after leader changes ([#&#8203;7402](https://github.com/nats-io/nats-server/issues/7402)) - Raft groups will no longer permit truncations from unexpected catchup entries if the catchup is completed ([#&#8203;7424](https://github.com/nats-io/nats-server/issues/7424)) - The filestore will now correctly release locks when erasing messages returns an error ([#&#8203;7431](https://github.com/nats-io/nats-server/issues/7431)) - Caches will now no longer expire unnecessarily when re-reading the same sequences multiple times in first-matching code paths ([#&#8203;7435](https://github.com/nats-io/nats-server/issues/7435)) - A couple of issues related to header handling have been fixed ([#&#8203;7465](https://github.com/nats-io/nats-server/issues/7465)) - No-wait requests now return a 400 No Messages response correctly if the stream is empty ([#&#8203;7466](https://github.com/nats-io/nats-server/issues/7466)) - Raft groups will now only report leadership status after a no-op entry on recovery ([#&#8203;7460](https://github.com/nats-io/nats-server/issues/7460)) - Fixed a race condition in the filestore that could happen between storing messages and shutting down ([#&#8203;7496](https://github.com/nats-io/nats-server/issues/7496)) - A panic that could occur when recovering streams in parallel has been fixed ([#&#8203;7503](https://github.com/nats-io/nats-server/issues/7503)) - An off-by-one when detecting holes at the end of a filestore block has been fixed ([#&#8203;7508](https://github.com/nats-io/nats-server/issues/7508)) - Writing skip message records in the filestore no longer releases and reacquires the lock unnecessarily ([#&#8203;7508](https://github.com/nats-io/nats-server/issues/7508)) - Fixed a bug on metalayer recovery where stream and consumer monitor goroutines for recreated assets would run with the wrong Raft group ([#&#8203;7510](https://github.com/nats-io/nats-server/issues/7510)) - Scaling up an asset from R1 now results in an installed snapshot, allowing recovery after restart if interrupted, avoiding a potential desync ([#&#8203;7509](https://github.com/nats-io/nats-server/issues/7509)) - Raft groups should no longer report no quorum incorrectly when shutting down ([#&#8203;7522](https://github.com/nats-io/nats-server/issues/7522)) - Consumers that existed in a metalayer snapshot but were deleted on recovery will no longer result in failing healthchecks ([#&#8203;7523](https://github.com/nats-io/nats-server/issues/7523)) - An off-by-one when detecting holes at the end of a filestore block has been fixed ([#&#8203;7525](https://github.com/nats-io/nats-server/issues/7525)) - Fixed a race condition that could happen with shutdown signals when shutting down JetStream ([#&#8203;7536](https://github.com/nats-io/nats-server/issues/7536)) - Fixed a deadlock that could occur when purging a stream with mismatched consumer state ([#&#8203;7546](https://github.com/nats-io/nats-server/issues/7546)) ##### Complete Changes ### [`v2.11.10`](https://github.com/nats-io/nats-server/releases/tag/v2.11.10) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.9...v2.11.10) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.7 ##### Dependencies - golang.org/x/crypto v0.42.0 ([#&#8203;7320](https://github.com/nats-io/nats-server/issues/7320)) - github.com/google/go-tpm v0.9.6 ([#&#8203;7376](https://github.com/nats-io/nats-server/issues/7376)) - github.com/nats-io/nats.go v1.46.1 ([#&#8203;7377](https://github.com/nats-io/nats-server/issues/7377)) ##### Improved General - Statistics for gateways, routes and leaf connections are now correctly omitted from `accstatsz` responses if empty ([#&#8203;7300](https://github.com/nats-io/nats-server/issues/7300)) JetStream - Stream assignment check has been simplified ([#&#8203;7290](https://github.com/nats-io/nats-server/issues/7290)) - Additional guards prevent panics when loading corrupted messages from the filestore ([#&#8203;7299](https://github.com/nats-io/nats-server/issues/7299)) - The store lock is no longer held while searching for TTL expiry tasks, improving performance ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Removing a message from the TTL state is now faster ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - The filestore no longer performs heap allocations for hash checks ([#&#8203;7345](https://github.com/nats-io/nats-server/issues/7345)) - Meta snapshot performance for a very large number of assets has been improved after a regression in v2.11.9 ([#&#8203;7350](https://github.com/nats-io/nats-server/issues/7350)) - Sequence-from-timestamp lookups, such as those using `opt_start_time` on consumers or `start_time` on message get requests, now use a binary search for improved lookup performance ([#&#8203;7357](https://github.com/nats-io/nats-server/issues/7357)) - JetStream API requests are always handled from the worker pool, improving the semantics of the API request queue and logging when requests take too long ([#&#8203;7125](https://github.com/nats-io/nats-server/issues/7125)) - JetStream will no longer perform a metalayer snapshot on every stream removal request, reducing API pauses and improving meta performance ([#&#8203;7373](https://github.com/nats-io/nats-server/issues/7373)) ##### Fixed General - Fixed the exit code when receiving a `SIGTERM` signal immediately after startup ([#&#8203;7367](https://github.com/nats-io/nats-server/issues/7367)) JetStream - Fixed a use-after-free bug and a buffer reclamation issue in the filestore flusher ([#&#8203;7295](https://github.com/nats-io/nats-server/issues/7295)) - Direct get requests now correctly skip over deleted messages if the starting sequence is itself deleted ([#&#8203;7291](https://github.com/nats-io/nats-server/issues/7291)) - The Raft layer now strictly enforces that non-leaders cannot send append entries ([#&#8203;7297](https://github.com/nats-io/nats-server/issues/7297)) - The filestore now correctly handles recovering filestore blocks with out-of-order sequences from disk corruption ([#&#8203;7303](https://github.com/nats-io/nats-server/issues/7303), [#&#8203;7304](https://github.com/nats-io/nats-server/issues/7304)) - The filestore now produces more useful error messages when disk corruption is detected ([#&#8203;7305](https://github.com/nats-io/nats-server/issues/7305)) - Removed messages with a per-message TTL are now removed from the TTL state immediately ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Fixed a bug where TTL state was recovered on startup with subject delete markers enabled, that message expiry would not start as expected ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Expiring messages from the filestore no longer leaks timers and expires at the correct time ([#&#8203;7344](https://github.com/nats-io/nats-server/issues/7344)) - Deleting a non-existent sequence on a stream no longer results in a cluster reset and leadership election ([#&#8203;7348](https://github.com/nats-io/nats-server/issues/7348)) - Subject tree intersection now correctly handles overlapping literals and partial wildcards, i.e. `stream.A` and `stream.*.A`, fixing some consumer or message get filters ([#&#8203;7349](https://github.com/nats-io/nats-server/issues/7349)) - A data race when checking all JetStream limits has been fixed ([#&#8203;7356](https://github.com/nats-io/nats-server/issues/7356)) - Raft will no longer trigger a reset of the clustered state due to a stream snapshot timeout ([#&#8203;7293](https://github.com/nats-io/nats-server/issues/7293)) ##### Complete Changes ### [`v2.11.9`](https://github.com/nats-io/nats-server/releases/tag/v2.11.9) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.8...v2.11.9) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.7 ([#&#8203;7273](https://github.com/nats-io/nats-server/issues/7273)) ##### Dependencies - golang.org/x/time v0.13.0 ([#&#8203;7273](https://github.com/nats-io/nats-server/issues/7273)) - golang.org/x/sys v0.36.0 ([#&#8203;7273](https://github.com/nats-io/nats-server/issues/7273)) ##### Improved JetStream - Offline assets support ([#&#8203;7158](https://github.com/nats-io/nats-server/issues/7158)) - Server version 2.12 will introduce new features that would otherwise break a 2.11 server after a downgrade. The server now reports the streams/consumers as offline and unsupported, keeping the data safe, but allowing to either delete the asset or upgrade back to the supported version without changes to the data itself. - The `raftz` endpoint now reports the cluster traffic account ([#&#8203;7186](https://github.com/nats-io/nats-server/issues/7186)) - The stream info and consumer info endpoints now return `leader_since` ([#&#8203;7189](https://github.com/nats-io/nats-server/issues/7189)) - The stream info and consumer info endpoints now return `system_account` and `traffic_account` ([#&#8203;7193](https://github.com/nats-io/nats-server/issues/7193)) - The `jsz` monitoring endpoint now returns `system_account` and `traffic_account` ([#&#8203;7193](https://github.com/nats-io/nats-server/issues/7193)) ##### Fixed General - Fix a panic that could happen at startup if building from source using non-Git version control ([#&#8203;7178](https://github.com/nats-io/nats-server/issues/7178)) - Fix an issue where issuing an account JWT update with a connection limit could cause older clients to be disconnected instead of newer ones ([#&#8203;7181](https://github.com/nats-io/nats-server/issues/7181), [#&#8203;7185](https://github.com/nats-io/nats-server/issues/7185)) - Route connections with invalid credentials will no longer rapidly reconnect ([#&#8203;7200](https://github.com/nats-io/nats-server/issues/7200)) - Allow a `default_sentinel` JWT from a scoped signing key instead of requiring it to solely be a bearer token for auth callout ([#&#8203;7217](https://github.com/nats-io/nats-server/issues/7217)) - Subject interest would not always be propagated for leaf nodes when daisy chaining imports/exports ([#&#8203;7255](https://github.com/nats-io/nats-server/issues/7255)) - Subject interest would sometimes be lost if the leaf node is a spoke ([#&#8203;7259](https://github.com/nats-io/nats-server/issues/7259)) - Lowering the max connections limit should no longer result in streams losing interest ([#&#8203;7258](https://github.com/nats-io/nats-server/issues/7258)) JetStream - The `Nats-TTL` header will now be correct if the subject delete marker TTL overwrites it ([#&#8203;7177](https://github.com/nats-io/nats-server/issues/7177)) - In operator mode, the `cluster_traffic` state for an account is now restored correctly when enabling JetStream at startup ([#&#8203;7191](https://github.com/nats-io/nats-server/issues/7191)) - A potential data race during a consumer create or update when reading its paused state has been fixed ([#&#8203;7201](https://github.com/nats-io/nats-server/issues/7201)) - A race condition that could allow creating a consumer with more replicas than the stream has been fixed ([#&#8203;7202](https://github.com/nats-io/nats-server/issues/7202)) - A race condition that could allow creating the same stream with different configurations has been fixed ([#&#8203;7210](https://github.com/nats-io/nats-server/issues/7210), [#&#8203;7212](https://github.com/nats-io/nats-server/issues/7212)) - Raft will now correctly reject delayed entries from an old leader when catching up in the meantime ([#&#8203;7209](https://github.com/nats-io/nats-server/issues/7209), [#&#8203;7239](https://github.com/nats-io/nats-server/issues/7239)) - Raft will now also limit the amount of cached in-memory entries as the leader, avoiding excessive memory usage ([#&#8203;7233](https://github.com/nats-io/nats-server/issues/7233)) - A potential race condition delaying shutdown if a stream/consumer monitor goroutine was not started ([#&#8203;7211](https://github.com/nats-io/nats-server/issues/7211)) - A benign underflow when using an infinite (-1) MaxDeliver for consumers ([#&#8203;7216](https://github.com/nats-io/nats-server/issues/7216)) - A potential panic to send a leader elected advisory when shutting down before completing startup ([#&#8203;7246](https://github.com/nats-io/nats-server/issues/7246)) - Stopping a stream should no longer wait indefinitely if the consumer monitor goroutine wasn’t stopped ([#&#8203;7249](https://github.com/nats-io/nats-server/issues/7249)) - Speed up stream mirroring and sourcing after a leaf node reconnects in complex topologies ([#&#8203;7265](https://github.com/nats-io/nats-server/issues/7265)) - Updating a stream with an empty placement will no longer incorrectly trigger a stream move ([#&#8203;7222](https://github.com/nats-io/nats-server/issues/7222)) Tests - Tests have been improved ([#&#8203;7172](https://github.com/nats-io/nats-server/issues/7172), [#&#8203;7230](https://github.com/nats-io/nats-server/issues/7230), [#&#8203;7213](https://github.com/nats-io/nats-server/issues/7213), [#&#8203;7248](https://github.com/nats-io/nats-server/issues/7248)) ##### Complete Changes ### [`v2.11.8`](https://github.com/nats-io/nats-server/releases/tag/v2.11.8) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.7...v2.11.8) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.6 ([#&#8203;7156](https://github.com/nats-io/nats-server/issues/7156)) ##### Dependencies - golang.org/x/crypto v0.41.0 ([#&#8203;7166](https://github.com/nats-io/nats-server/issues/7166)) - golang.org/x/sys v0.35.0 ([#&#8203;7166](https://github.com/nats-io/nats-server/issues/7166)) ##### Added General - Community-contributed support for building on Solaris and Illumos ([#&#8203;7122](https://github.com/nats-io/nats-server/issues/7122), thanks to [@&#8203;jwntree](https://github.com/jwntree)) ##### Fixed General - String-to-integer parsing has been improved in various places to prevent overflows/underflows ([#&#8203;7145](https://github.com/nats-io/nats-server/issues/7145)) JetStream - Fixed an incorrectly formatted log line when failing to load a block when recovering TTLs ([#&#8203;7150](https://github.com/nats-io/nats-server/issues/7150)) - Raft will now step down if a higher term is detected during a catchup ([#&#8203;7151](https://github.com/nats-io/nats-server/issues/7151)) - Raft will now more reliably ignore entries from previous/cancelled catchups that arrive late ([#&#8203;7151](https://github.com/nats-io/nats-server/issues/7151)) - Fix a potential panic that could happen by a division by zero when applying Raft entries ([#&#8203;7151](https://github.com/nats-io/nats-server/issues/7151)) - The healthcheck endpoint should no longer report transient errors for newly created or recently deleted consumers ([#&#8203;7154](https://github.com/nats-io/nats-server/issues/7154)) - Fix a potential panic when trying to truncate a filestore block that doesn't exist ([#&#8203;7162](https://github.com/nats-io/nats-server/issues/7162)) - Clean up stale `index.db` file when truncating so that it is not inconsistent if the truncate operation is interrupted ([#&#8203;7162](https://github.com/nats-io/nats-server/issues/7162)) - Fix an off-by-one problem when Raft truncates to the correct index at startup ([#&#8203;7162](https://github.com/nats-io/nats-server/issues/7162)) - Ephemeral consumers will always select an online server when created on a replicated stream ([#&#8203;7165](https://github.com/nats-io/nats-server/issues/7165)) Tests - Tests have been improved ([#&#8203;7140](https://github.com/nats-io/nats-server/issues/7140)) ##### Complete Changes ### [`v2.11.7`](https://github.com/nats-io/nats-server/releases/tag/v2.11.7) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.6...v2.11.7) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.5 ([#&#8203;7047](https://github.com/nats-io/nats-server/issues/7047)) ##### Dependencies - golang.org/x/crypto v0.40.0 ([#&#8203;7061](https://github.com/nats-io/nats-server/issues/7061)) - golang.org/x/sys v0.34.0 ([#&#8203;7061](https://github.com/nats-io/nats-server/issues/7061)) ##### Added General - The `SubjectMatchesFilter` function is now available as an exported function for embedded use ([#&#8203;7051](https://github.com/nats-io/nats-server/issues/7051)) - The `leafz` monitoring endpoint now includes the connection ID ([#&#8203;7063](https://github.com/nats-io/nats-server/issues/7063)) - The monitoring endpoint index page now includes the endpoint names on hover ([#&#8203;7066](https://github.com/nats-io/nats-server/issues/7066), [#&#8203;7087](https://github.com/nats-io/nats-server/issues/7087)) ##### Improved JetStream - Consumers with inactivity thresholds should no longer age out before processing acks ([#&#8203;7107](https://github.com/nats-io/nats-server/issues/7107)) - The Raft layer will no longer request store state on each apply ([#&#8203;7109](https://github.com/nats-io/nats-server/issues/7109)) - Tombstones in Raft log compactions will now be written asynchronously, similar to purges ([#&#8203;7109](https://github.com/nats-io/nats-server/issues/7109)) - When enabling per-message TTLs on a stream, existing messages with the `Nats-TTL` header are now scanned and processed ([#&#8203;7117](https://github.com/nats-io/nats-server/issues/7117)) ##### Fixed General - Message header lookups with common prefixes will now return correctly in all cases, fixing a problem where the headers could be sensitive to ordering ([#&#8203;7065](https://github.com/nats-io/nats-server/issues/7065)) - Validate that the `default_sentinel` JWT is a bearer token for auth callout (7074) - The `$SYS.REQ.USER.INFO` endpoint should now only be answered by the local server, fixing cases where the endpoint may sometimes return without full connection details ([#&#8203;7089](https://github.com/nats-io/nats-server/issues/7089)) JetStream - The Raft layer will require recovery and snapshot handling at startup before campaigning for a leadership election, fixing a situation where a node could continue with an outdated stream ([#&#8203;7040](https://github.com/nats-io/nats-server/issues/7040)) - The Raft log will no longer be compacted until after a snapshot is written, improving crash resilience ([#&#8203;7043](https://github.com/nats-io/nats-server/issues/7043)) - A race condition when shutting down Raft nodes which could result in no snapshot being written has been fixed ([#&#8203;7045](https://github.com/nats-io/nats-server/issues/7045)) - Consumer pull requests that use `no_wait` or `expires` behaviour has been fixed with replicated consumers ([#&#8203;7046](https://github.com/nats-io/nats-server/issues/7046)) - Pull consumers with an inactive threshold will now consider pending acks when determining inactivity, preventing the consumer from being deleted while messages are being processed ([#&#8203;7052](https://github.com/nats-io/nats-server/issues/7052)) - Push consumers will now correctly error when trying to configure priority groups ([#&#8203;7053](https://github.com/nats-io/nats-server/issues/7053)) - Committed entry objects will now be correctly returned to the pool on error, reducing allocations ([#&#8203;7064](https://github.com/nats-io/nats-server/issues/7064)) - The time hash wheel used for per-message TTLs now correctly detects and expires messages with TTLs over an hour, previously it could take double the expected time ([#&#8203;7070](https://github.com/nats-io/nats-server/issues/7070)) - A potential panic when selecting message blocks during TTL recovery has been fixed ([#&#8203;7072](https://github.com/nats-io/nats-server/issues/7072)) - A KV purge operation with subject delete markers configured will no longer leave behind a redundant extra delete marker ([#&#8203;7026](https://github.com/nats-io/nats-server/issues/7026)) - Raft will now correctly attempt to truncate back to a snapshot if applies were not caught up instead of resetting the entire log ([#&#8203;7095](https://github.com/nats-io/nats-server/issues/7095)) - Store cipher conversion will now work correctly when combined with store compression ([#&#8203;7099](https://github.com/nats-io/nats-server/issues/7099)) - Truncate and erase operations in the filestore should now be consistent after a hard kill ([#&#8203;7100](https://github.com/nats-io/nats-server/issues/7100)) - When a filestore message block is deleted and an unclean shutdown results in a stale `index.db`, the deleted blocks are now correctly marked as lost data and the index is rebuilt ([#&#8203;7123](https://github.com/nats-io/nats-server/issues/7123)) - Fixed a potential underflow that could happen when modifying `max_bytes` reservations ([#&#8203;7131](https://github.com/nats-io/nats-server/issues/7131)) Tests - Tests have been improved ([#&#8203;7031](https://github.com/nats-io/nats-server/issues/7031), [#&#8203;7036](https://github.com/nats-io/nats-server/issues/7036), [#&#8203;7050](https://github.com/nats-io/nats-server/issues/7050), [#&#8203;6728](https://github.com/nats-io/nats-server/issues/6728), [#&#8203;7096](https://github.com/nats-io/nats-server/issues/7096)) ##### Complete Changes ### [`v2.11.6`](https://github.com/nats-io/nats-server/releases/tag/v2.11.6) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.5...v2.11.6) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.4 ##### Improved JetStream - Sources will no longer update their last seen timestamp when stalled, making it clearer how long it has been since the last contact ([#&#8203;7013](https://github.com/nats-io/nats-server/issues/7013)) - Overall consumer performance has been improved by reducing allocations and improving the num pending calculation ([#&#8203;7022](https://github.com/nats-io/nats-server/issues/7022)) ##### Fixed General - The `subsz` monitoring endpoint now returns the correct `total` for subscription details, aligning behaviour with other endpoints for pagination ([#&#8203;7009](https://github.com/nats-io/nats-server/issues/7009)) JetStream - Fixed a bug where filestore encryption could corrupt a message block if a write took place before a read after restarting the server ([#&#8203;7008](https://github.com/nats-io/nats-server/issues/7008)) - Fixed a performance regression introduced in v2.11.0 which could result in abnormally low throughput from filtered consumers and higher GC pressure ([#&#8203;7015](https://github.com/nats-io/nats-server/issues/7015)) - Healthchecks will no longer produce unexpected monitor goroutine warnings when a clustered stream is restored from a snapshot ([#&#8203;7019](https://github.com/nats-io/nats-server/issues/7019)) - A race condition that could result in removed streams incorrectly reappearing has been fixed ([#&#8203;7025](https://github.com/nats-io/nats-server/issues/7025)) - The `reserved_memory` and `reserved_storage` statistics will no longer underflow when no limits are set ([#&#8203;7024](https://github.com/nats-io/nats-server/issues/7024)) ##### Complete Changes ### [`v2.11.5`](https://github.com/nats-io/nats-server/releases/tag/v2.11.5) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.4...v2.11.5) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.4 ([#&#8203;6948](https://github.com/nats-io/nats-server/issues/6948)) ##### Dependencies - github.com/nats-io/nats.go v1.43.0 ([#&#8203;6956](https://github.com/nats-io/nats-server/issues/6956)) - golang.org/x/crypto v0.39.0 ([#&#8203;6956](https://github.com/nats-io/nats-server/issues/6956)) - golang.org/x/time v0.12.0 ([#&#8203;6956](https://github.com/nats-io/nats-server/issues/6956)) ##### Improved General - The `connz` monitoring endpoint now includes leafnode connections ([#&#8203;6949](https://github.com/nats-io/nats-server/issues/6949)) - The `accstatsz` monitoring endpoint now contains leafnode, route and gateway connection stats ([#&#8203;6967](https://github.com/nats-io/nats-server/issues/6967)) JetStream - Sourcing and mirroring should now resync more quickly when sourcing over leafnodes after a connection failure ([#&#8203;6981](https://github.com/nats-io/nats-server/issues/6981)) - Reduced lock contention when reporting stream ingest warnings ([#&#8203;6934](https://github.com/nats-io/nats-server/issues/6934)) - Log lines for resetting Raft WAL state have been clarified ([#&#8203;6938](https://github.com/nats-io/nats-server/issues/6938)) - Determining if acks are required in interest-based streams has been optimised with fewer memory allocations ([#&#8203;6990](https://github.com/nats-io/nats-server/issues/6990)) - Ephemeral R1 consumers will no longer log `new consumer leader` on clustered setups, reducing log noise when watchers etc are in use ([#&#8203;7003](https://github.com/nats-io/nats-server/issues/7003)) ##### Fixed General - Leafnodes with restrictive permissions can now route replies correctly when the message originates from a supercluster ([#&#8203;6931](https://github.com/nats-io/nats-server/issues/6931)) - Memory usage is now reported correctly on Linux systems with huge pages enabled ([#&#8203;7006](https://github.com/nats-io/nats-server/issues/7006)) JetStream - Updating the `AllowMsgTTL` setting on a stream will now take effect correctly ([#&#8203;6922](https://github.com/nats-io/nats-server/issues/6922)) - A potential deadlock when purging stream consumers has been fixed ([#&#8203;6933](https://github.com/nats-io/nats-server/issues/6933)) - A race condition that could prevent stream snapshots on shutdown has been fixed ([#&#8203;6942](https://github.com/nats-io/nats-server/issues/6942)) - Streams should no longer desync after a partial catchup following a snapshot ([#&#8203;6943](https://github.com/nats-io/nats-server/issues/6943)) - Streams should no longer desync due to catchup messages with incorrect quorum ([#&#8203;6944](https://github.com/nats-io/nats-server/issues/6944)) - Intersection between two subject trees where one is nil will no longer panic ([#&#8203;6945](https://github.com/nats-io/nats-server/issues/6945)) - Consumer pull requests with `NoWait` will now return correctly from replicated consumers ([#&#8203;6960](https://github.com/nats-io/nats-server/issues/6960)) - Mirrors now remove `Nats-Expected-` headers that could interfere with mirroring operations ([#&#8203;6961](https://github.com/nats-io/nats-server/issues/6961)) - Network-partitioned Raft nodes should no longer desync by accepting catchups from nodes with lower term ([#&#8203;6951](https://github.com/nats-io/nats-server/issues/6951)) - A potential data race when accessing the cluster failed sequence count has been fixed ([#&#8203;6965](https://github.com/nats-io/nats-server/issues/6965)) - Corrected handling of append entry response conditions and recycling to the response pool ([#&#8203;6968](https://github.com/nats-io/nats-server/issues/6968)) - A potential data race when copying stream metadata has been fixed ([#&#8203;6983](https://github.com/nats-io/nats-server/issues/6983)) - Healthchecks will no longer unset a group Raft node when not fully setup ([#&#8203;6984](https://github.com/nats-io/nats-server/issues/6984)) - Stream retention policy changes are now correctly propagated to running consumers in all cases ([#&#8203;6995](https://github.com/nats-io/nats-server/issues/6995)) - Raft now uses monotonic time for heartbeat tracking and determining quorum, making it resilient against wall-clock drifts or adjustments from NTP ([#&#8203;6999](https://github.com/nats-io/nats-server/issues/6999)) - The `healthz` monitoring endpoint no longer tries to fix up cluster node skews, as this could interfere with processing assignments ([#&#8203;7001](https://github.com/nats-io/nats-server/issues/7001)) - The consumer `DeliverLastPerSubject` delivery policy now correctly deliver messages and handles acks when there are interior deletes, such as when `MaxMsgsPerSubject` limits are in use on the stream ([#&#8203;7005](https://github.com/nats-io/nats-server/issues/7005)) - Consumers that are up against the `MaxWaiting` limit will no longer respond if the request heartbeat is set, to avoid client tightloops ([#&#8203;7011](https://github.com/nats-io/nats-server/issues/7011)) ##### Complete Changes ### [`v2.11.4`](https://github.com/nats-io/nats-server/releases/tag/v2.11.4) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.3...v2.11.4) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.3 ([#&#8203;6876](https://github.com/nats-io/nats-server/issues/6876)) ##### Dependencies - github.com/nats-io/nats.go v1.42.0 ([#&#8203;6868](https://github.com/nats-io/nats-server/issues/6868)) - golang.org/x/crypto v0.38.0 ([#&#8203;6868](https://github.com/nats-io/nats-server/issues/6868)) - golang.org/x/sys v0.33.0 ([#&#8203;6868](https://github.com/nats-io/nats-server/issues/6868)) - github.com/google/go-tpm v0.9.5 ([#&#8203;6918](https://github.com/nats-io/nats-server/issues/6918)) ##### Improved General - Log lines for TLS handshake errors now include the subject and SHA-256 hash of the certificate if known ([#&#8203;6883](https://github.com/nats-io/nats-server/issues/6883)) JetStream - Enforcing per-subject limits on streams after a state rebuild or retention policy change is now considerably faster ([#&#8203;6871](https://github.com/nats-io/nats-server/issues/6871)) - Reduced allocations when finding the next message matching a filter in the filestore, which also improves the performance of calculating interest state on streams with an interest/WQ retention policy ([#&#8203;6908](https://github.com/nats-io/nats-server/issues/6908)) ##### Fixed General - Reloading the gateway TLS configuration now applies to implicit remotes ([#&#8203;6886](https://github.com/nats-io/nats-server/issues/6886)) JetStream - Stream and consumer updates are no longer possible if all peers are offline, fixing a potential avenue for data loss ([#&#8203;6856](https://github.com/nats-io/nats-server/issues/6856)) - The stream first sequence is now adjusted correctly when purging over interior delete gaps ([#&#8203;6861](https://github.com/nats-io/nats-server/issues/6861)) - Consumer redeliveries are no longer incorrectly reported for consumers with a max deliver of 1 ([#&#8203;6877](https://github.com/nats-io/nats-server/issues/6877)) - Avoid resetting the first and last sequences of a workqueue stream to zero after a crash with unflushed data ([#&#8203;6882](https://github.com/nats-io/nats-server/issues/6882)) - Access time goroutines are now reference-counted and no longer leak ([#&#8203;6887](https://github.com/nats-io/nats-server/issues/6887)) - Fixed a deadlock that could occur when using `multi_last` direct gets or when calculating the first sequence number for a consumer with a deliver-last-per-subject deliver policy ([#&#8203;6899](https://github.com/nats-io/nats-server/issues/6899)) - A spelling error in a store error was fixed ([#&#8203;6895](https://github.com/nats-io/nats-server/issues/6895)) Thanks to [@&#8203;cjohansen](https://github.com/cjohansen) for the contribution! - A rare panic in the filestore has been fixed ([#&#8203;6912](https://github.com/nats-io/nats-server/issues/6912)) - Direct gets will no longer return messages incorrectly with `up_to_time` or `start_time` in some configurations ([#&#8203;6911](https://github.com/nats-io/nats-server/issues/6911)) - Fixed a panic in the stree that could occur when removing subject state tracking for a short subject ([#&#8203;6914](https://github.com/nats-io/nats-server/issues/6914)) ##### Complete Changes ### [`v2.11.3`](https://github.com/nats-io/nats-server/releases/tag/v2.11.3) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.2...v2.11.3) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.2 ##### Added MQTT - New `js_api_timeout` option controls how long to wait for JetStream operations caused by MQTT calls ([#&#8203;6833](https://github.com/nats-io/nats-server/issues/6833)) ##### Improved JetStream - Reduced allocations in subject tree matching ([#&#8203;6837](https://github.com/nats-io/nats-server/issues/6837)) ##### Fixed General - Fixed TLS 1.2 negotiation when using ECDSA certificates from the Windows certificate store ([#&#8203;6803](https://github.com/nats-io/nats-server/issues/6803)) JetStream - Fix a regression introduced in v2.11.2 which can affect calculating consumer subject interest ([#&#8203;6845](https://github.com/nats-io/nats-server/issues/6845)) - Consumer state reporting of filtered consumers is now more consistent ([#&#8203;6835](https://github.com/nats-io/nats-server/issues/6835)) - Raft nodes will now correctly report to the upper layer when a preferred node does not become the leader, fixing some issues where multiple assets can believe they are the leader after a scale-up operation ([#&#8203;6851](https://github.com/nats-io/nats-server/issues/6851)) Monitoring - The `connz` endpoint will now return open connections correctly with `state` set to `all` ([#&#8203;6849](https://github.com/nats-io/nats-server/issues/6849)) ##### Complete Changes ### [`v2.11.2`](https://github.com/nats-io/nats-server/releases/tag/v2.11.2) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.1...v2.11.2) > \[!IMPORTANT] > This version contains a regression that has since been fixed in 2.11.3. Please upgrade to that version instead. #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.2 ##### Dependencies - github.com/nats-io/nats.go v1.41.2 ([#&#8203;6805](https://github.com/nats-io/nats-server/issues/6805)) - github.com/nats-io/nkeys v0.4.11 ([#&#8203;6805](https://github.com/nats-io/nats-server/issues/6805)) - github.com/nats-io/jwt/v2 v2.7.4 ([#&#8203;6813](https://github.com/nats-io/nats-server/issues/6813)) ##### Added General - Support for a default sentinel JWT, which is used in operator mode when none is specified, has been added making it possible to have default users ([#&#8203;6577](https://github.com/nats-io/nats-server/issues/6577)) - New `trace_headers` option to ensure that trace logging only emits headers and not message payloads ([#&#8203;6638](https://github.com/nats-io/nats-server/issues/6638)) JetStream - Subject delete markers are now placed for messages that have aged out due to their TTL and not just because of the `MaxAge` policy ([#&#8203;6741](https://github.com/nats-io/nats-server/issues/6741)) ##### Improved General - The publish permissions cache should now remain under the max allowed size more aggressively with improved pruning ([#&#8203;6674](https://github.com/nats-io/nats-server/issues/6674)) - It is now possible with service imports to import the same subject from multiple different accounts ([#&#8203;6704](https://github.com/nats-io/nats-server/issues/6704)) - Updating an account claim with a reduced max connection count no longer causes internal clients to be closed, fixing cases where JetStream assets could become unavailable ([#&#8203;6785](https://github.com/nats-io/nats-server/issues/6785)) - `GOMAXPROCS` and `GOMEMLIMIT` are now reported in both `statsz` and `varz` ([#&#8203;6791](https://github.com/nats-io/nats-server/issues/6791)) - Improved `tls_timeout` configuration parsing consistency between `authorization` and `timeout` ([#&#8203;6731](https://github.com/nats-io/nats-server/issues/6731)) - Allow servers with different pool sizes when using multiple routes, simplifying configuration changes and rolling updates ([#&#8203;6676](https://github.com/nats-io/nats-server/issues/6676)) - Auth tokens are now redacted in trace-level logs for enhanced security ([#&#8203;6808](https://github.com/nats-io/nats-server/issues/6808)) - Trapped signals are now logged at notice level instead of debug ([#&#8203;6800](https://github.com/nats-io/nats-server/issues/6800)) JetStream - Improved purge performance, particularly for KV `PurgeDeletes` calls, with optimised code paths for finding last sequences and reducing allocations ([#&#8203;6801](https://github.com/nats-io/nats-server/issues/6801), [#&#8203;6825](https://github.com/nats-io/nats-server/issues/6825)) - Improved replicated asset creation performance by campaigning for group leadership more quickly ([#&#8203;6697](https://github.com/nats-io/nats-server/issues/6697)) - Improved the debug log message when resetting a group WAL after failing to truncate ([#&#8203;6705](https://github.com/nats-io/nats-server/issues/6705)) - Improved checking for streams that overlap with JS API or system subjects, so that badly-configured streams should not be able to break the API ([#&#8203;6786](https://github.com/nats-io/nats-server/issues/6786)) - Allow setting per-message TTLs to values lower than the configured `SubjectDeleteMarkerTTL` when the stream has a max messages per subject limit of 1 ([#&#8203;6818](https://github.com/nats-io/nats-server/issues/6818)) - Servers that have been `peer-remove`'d can now be re-admitted automatically after 5 minutes without a server restart ([#&#8203;6815](https://github.com/nats-io/nats-server/issues/6815)) ##### Fixed General - Fix a possible panic when a subject transform has missing tokens ([#&#8203;6612](https://github.com/nats-io/nats-server/issues/6612)) - Fix a possible panic when adding dedicated routes during a configuration reload ([#&#8203;6668](https://github.com/nats-io/nats-server/issues/6668)) - Data race when shutting down eventing has been resolved ([#&#8203;6620](https://github.com/nats-io/nats-server/issues/6620)) - A deadlock when updating account claims with service imports/exports has now been fixed ([#&#8203;6726](https://github.com/nats-io/nats-server/issues/6726)) - The `jsz` monitoring endpoint now correctly paginates with `offset` ([#&#8203;6794](https://github.com/nats-io/nats-server/issues/6794), [#&#8203;6816](https://github.com/nats-io/nats-server/issues/6816)) - Parsing the `cluster_traffic` option at startup no longer results in a panic if the account has not loaded yet ([#&#8203;6733](https://github.com/nats-io/nats-server/issues/6733)) JetStream - Fix clustered consumer consistency problems by waiting for delivered state to reach quorum before delivering new messages, resolving issues where acknowledged messages could be redelivered after a consumer leader change - **NOTE:** This may negatively impact the throughput of replicated consumers. R1 consumers, consumers with `AckNone` ack policy and ordered consumers are not affected and may be more suitable for high-speed processing - JetStream is no longer incorrectly disabled when specifying `--js` and `--store_dir` on the command line and then issuing a configuration reload ([#&#8203;6609](https://github.com/nats-io/nats-server/issues/6609)) - Correctly remove messages from an interest-based stream when using `AckAll` consumers ([#&#8203;6587](https://github.com/nats-io/nats-server/issues/6587)) - Preserve the first sequence when rebuilding state due to invalid checksums with no remaining messages ([#&#8203;6647](https://github.com/nats-io/nats-server/issues/6647)) - When recovering from disk, ignore temporary files that can be created during stream compression so that the same blocks do not get loaded more than once ([#&#8203;6684](https://github.com/nats-io/nats-server/issues/6684)) - Do not incorrectly reset group WALs when a new leader sends matching term information after a snapshot ([#&#8203;6691](https://github.com/nats-io/nats-server/issues/6691)) - Corrected a regression in the memory store when purging, aligning it with the filestore behaviour ([#&#8203;6714](https://github.com/nats-io/nats-server/issues/6714)) - When issuing a peer remove on a stream, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers ([#&#8203;6720](https://github.com/nats-io/nats-server/issues/6720)) - When issuing a peer remove on a consumer, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers ([#&#8203;6727](https://github.com/nats-io/nats-server/issues/6727)) - A race condition that could result in observer nodes becoming incorrectly elected as a group leader has been fixed when using leafnodes with shared system accounts ([#&#8203;6730](https://github.com/nats-io/nats-server/issues/6730)) - Ensure that duplicate Raft groups are not created for the same asset during a restart ([#&#8203;6732](https://github.com/nats-io/nats-server/issues/6732)) - Allow the use of the extended consumer create API when combining service imports/exports and limited API permissions ([#&#8203;6759](https://github.com/nats-io/nats-server/issues/6759)) - Streams with the `FirstSeq` configured are no longer incorrectly purged after a restart if the stream first sequence still matches the configured first sequence ([#&#8203;6753](https://github.com/nats-io/nats-server/issues/6753)) - Correctly write tombstones when purging and compacting, fixing a bug that could result in some deleted messages returning if the stream index had to be rebuilt ([#&#8203;6685](https://github.com/nats-io/nats-server/issues/6685)) - The memory store no longer leaks memory tracking deleted sequences after a full stream purge ([#&#8203;6769](https://github.com/nats-io/nats-server/issues/6769)) - Correctly handle acks for subjects that include a `@` character ([#&#8203;6777](https://github.com/nats-io/nats-server/issues/6777)) - Avoid losing stream sequence numbers of the server is interrupted by generating a new last message block before removing the final remaining block, particularly noticeable with WQ or interest retention policies ([#&#8203;6778](https://github.com/nats-io/nats-server/issues/6778)) - Use the correct floor when using `AckAll` in R1 consumers ([#&#8203;6790](https://github.com/nats-io/nats-server/issues/6790)) - Preserve consumer state when a stream needs to be reset due to a failed catchup ([#&#8203;6796](https://github.com/nats-io/nats-server/issues/6796)) - Correctly enforce the 32MB maximum publish size limit into JetStream, avoiding filestore corruption from overflowing the maximum record length ([#&#8203;6798](https://github.com/nats-io/nats-server/issues/6798)) - Preserve the redelivered state if the consumer leader is placed on a server that is a lagging stream follower to keep accounting correct ([#&#8203;6698](https://github.com/nats-io/nats-server/issues/6698)) - Idempotent stream or consumer creations on a server upgrade from 2.10.x will no longer fail due to metadata changes ([#&#8203;6716](https://github.com/nats-io/nats-server/issues/6716)) - Do not place rejected messages with invalid TTLs into the deduplication map if using `Nats-Msg-Id` ([#&#8203;6725](https://github.com/nats-io/nats-server/issues/6725)) - Message TTLs are now recovered properly from multiple messages if the timed hash wheel state is lost or corrupted on disk ([#&#8203;6758](https://github.com/nats-io/nats-server/issues/6758)) - Consumer priority groups will no longer get stuck in a tight-loop if there are multiple requests from different clients but some are not receiving due to the priority policy ([#&#8203;6749](https://github.com/nats-io/nats-server/issues/6749)) - Subject delete markers are now replicated more reliably and are now retriable, improving consistency in clustered mode ([#&#8203;6776](https://github.com/nats-io/nats-server/issues/6776)) - Tombstones are now correctly written for messages that have aged out due to their TTL, such that the deletion is preserved if the stream state is rebuilt ([#&#8203;6781](https://github.com/nats-io/nats-server/issues/6781)) - Corrected an off-by-one error that could cause the TTL state to be rebuilt unnecessarily on a server restart ([#&#8203;6679](https://github.com/nats-io/nats-server/issues/6679)) - Fixed a race condition in the timed hash wheel that could result in an underflow of the hash count ([#&#8203;6787](https://github.com/nats-io/nats-server/issues/6787)) - Push consumers are no longer incorrectly marked as inactive after a delivery failure if there is continued interest ([#&#8203;6807](https://github.com/nats-io/nats-server/issues/6807)) - Internal clients for JetStream are no longer closed unexpectedly after updating an expired account claim ([#&#8203;6817](https://github.com/nats-io/nats-server/issues/6817)) - Fixed a panic that could potentially occur when starting clustered consumers when the metalayer is shutting down ([#&#8203;6823](https://github.com/nats-io/nats-server/issues/6823)) - Fixed a bug in subject tree intersection that could miss some subjects when looking for first matching messages matching `FilterSubjects` ([#&#8203;6828](https://github.com/nats-io/nats-server/issues/6828)) - Subject delete markers now have the correct headers when retrieved using direct get ([#&#8203;6826](https://github.com/nats-io/nats-server/issues/6826)) - Messages with a TTL now are removed correctly after a restart has interrupted the deletion process ([#&#8203;6828](https://github.com/nats-io/nats-server/issues/6828)) Gateways - Fixed a bug that could result in a lost queue subscriptions on gateway connections after a restart or a remote unsubscribe ([#&#8203;6607](https://github.com/nats-io/nats-server/issues/6607)) ##### Complete Changes ### [`v2.11.1`](https://github.com/nats-io/nats-server/releases/tag/v2.11.1) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.11.0...v2.11.1) #### Changelog ##### Go Version - 1.24.1 ##### CVEs - This release contains fixes for CVE-2025-30215, a CRITICAL severity vulnerability affecting all NATS Server versions from v2.2.0, prior to v2.11.1 or v2.10.27. ##### Fixed JetStream - Correctly validate the calling account on a number of system API calls - Check system and account limits when processing a stream restore ##### Complete Changes ### [`v2.11.0`](https://github.com/nats-io/nats-server/releases/tag/v2.11.0) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.10.29...v2.11.0) #### Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_211) for backwards compatibility notes with 2.10.x. ##### Go Version - 1.24.1 ([#&#8203;6629](https://github.com/nats-io/nats-server/issues/6629)) ##### Dependencies - golang.org/x/crypto v0.36.0 ([#&#8203;6618](https://github.com/nats-io/nats-server/issues/6618)) - golang.org/x/sys v0.31.0 ([#&#8203;6618](https://github.com/nats-io/nats-server/issues/6618)) - golang.org/x/time v0.11.0 ([#&#8203;6618](https://github.com/nats-io/nats-server/issues/6618)) - github.com/google/go-tpm v0.9.3 ([#&#8203;6295](https://github.com/nats-io/nats-server/issues/6295)) - github.com/antithesishq/antithesis-sdk-go v0.4.3-default-no-op ([#&#8203;6164](https://github.com/nats-io/nats-server/issues/6164)) ##### Added General - Distributed message tracing ([#&#8203;5014](https://github.com/nats-io/nats-server/issues/5014), [#&#8203;5057](https://github.com/nats-io/nats-server/issues/5057)) - A message with the `Nats-Trace-Dest` header set to a valid subject will receive events representing what happens to the message as it moves through the system - Events contain information such as ingress, subject mapping, stream exports, service imports, egress to subscriptions, routes, gateways or leafnodes - An additional `Nats-Trace-Only` header, if set to `true`, will produce the same tracing events but will not deliver the message to the final destination - Configuration state digest ([#&#8203;4325](https://github.com/nats-io/nats-server/issues/4325)) - A hash of the configuration file can be generated using the `-t` option on the command line - The hash of the currently running configuration file can be seen in the `config_digest` option in `varz` - Enable scoped users to have templates that are not limited to a subject token ([#&#8203;5981](https://github.com/nats-io/nats-server/issues/5981)) - New `js-meta-only` option for `healthz` healthcheck ([#&#8203;6649](https://github.com/nats-io/nats-server/issues/6649)) JetStream - Per-message TTLs ([#&#8203;6272](https://github.com/nats-io/nats-server/issues/6272), [#&#8203;6354](https://github.com/nats-io/nats-server/issues/6354), [#&#8203;6363](https://github.com/nats-io/nats-server/issues/6363), [#&#8203;6370](https://github.com/nats-io/nats-server/issues/6370), [#&#8203;6376](https://github.com/nats-io/nats-server/issues/6376), [#&#8203;6385](https://github.com/nats-io/nats-server/issues/6385), [#&#8203;6400](https://github.com/nats-io/nats-server/issues/6400)) - The `Nats-TTL` header, provided either as a string duration (`1m`, `30s`) or an integer in seconds, will age out the message independently of stream limits - More information on this is available in [ADR-43](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-43.md) - Subject delete markers on `MaxAge` ([#&#8203;6378](https://github.com/nats-io/nats-server/issues/6378), [#&#8203;6389](https://github.com/nats-io/nats-server/issues/6389), [#&#8203;6393](https://github.com/nats-io/nats-server/issues/6393), [#&#8203;6400](https://github.com/nats-io/nats-server/issues/6400), [#&#8203;6404](https://github.com/nats-io/nats-server/issues/6404), [#&#8203;6428](https://github.com/nats-io/nats-server/issues/6428), [#&#8203;6432](https://github.com/nats-io/nats-server/issues/6432)) - The `SubjectDeleteMarkerTTL` stream configuration option determines whether to place marker messages and how long they should live for - The marker message will have a `Nats-Marker-Reason` header explaining which limit caused the marker to be left behind - More information on this is available in [ADR-43](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-43.md) - Pull consumer priority groups with pinning and overflow ([#&#8203;5814](https://github.com/nats-io/nats-server/issues/5814), [#&#8203;6078](https://github.com/nats-io/nats-server/issues/6078), [#&#8203;6081](https://github.com/nats-io/nats-server/issues/6081)) - Allows patterns such as one consumer receiving all messages, but handing over to a second consumer if the first one fails, or groups of clients accessing the same consumer should have different priorities - The `PriorityGroups` and `PriorityPolicy` options in the consumer configuration control the policy - More information on this is available in [ADR-42](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-42.md) - Consumer pausing ([#&#8203;5066](https://github.com/nats-io/nats-server/issues/5066)) - The `PauseUntil` consumer configuration option and `$JS.API.CONSUMER.PAUSE` endpoint suspends message delivery to the consumer until the time specified is reached, after which point it will resume automatically - Asset versioning ([#&#8203;5850](https://github.com/nats-io/nats-server/issues/5850), [#&#8203;5855](https://github.com/nats-io/nats-server/issues/5855), [#&#8203;5857](https://github.com/nats-io/nats-server/issues/5857)) - More information on this is available in [ADR-44](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-44.md) - Multi-get directly from a stream ([#&#8203;5107](https://github.com/nats-io/nats-server/issues/5107)) - More information on this is available in [ADR-31](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-31.md) - Pedantic mode ([#&#8203;5245](https://github.com/nats-io/nats-server/issues/5245)) - Ensures that stream and consumer creates or updates will fail if the resulting configuration would differ due to defaults, useful for desired-state configuration - Stream ingest rate limiting ([#&#8203;5796](https://github.com/nats-io/nats-server/issues/5796)) - New `max_buffered_size` and `max_buffered_msgs` options in the `jetstream` block of the server config control how many publishes should be queued before rate-limiting, making it easier to protect the system against Core NATS publishes into JetStream - Where a reply subject is provided, rate-limited messages will receive a 429 “Too Many Requests” response and can retry later - Support for `Nats-Expected-Last-Subject-Sequence-Subject` header, customising the subject used when paired with `Nats-Expected-Last-Subject-Sequence` ([#&#8203;5281](https://github.com/nats-io/nats-server/issues/5281)) Thanks to [@&#8203;cchamplin](https://github.com/cchamplin) for the contribution! - Ability to move cluster Raft traffic into the asset account instead of using the system account using the new `cluster_traffic` configuration option ([#&#8203;5466](https://github.com/nats-io/nats-server/issues/5466), [#&#8203;5947](https://github.com/nats-io/nats-server/issues/5947)) - Ability to specify preferred placement tags or clusters using `preferred` when issuing stepdown requests to the metaleader, streams or consumers ([#&#8203;6282](https://github.com/nats-io/nats-server/issues/6282), [#&#8203;6284](https://github.com/nats-io/nats-server/issues/6284)) - Implement strict decoding for JetStream API requests with the new `strict` option in the `jetstream` block of the server config ([#&#8203;5858](https://github.com/nats-io/nats-server/issues/5858)) - JetStream encryption on Windows can now use the TPM for key storage ([#&#8203;5273](https://github.com/nats-io/nats-server/issues/5273)) - The `js_cluster_migrate` option can now be configured with a delay, controlling how long before a failure would result in asset migration ([#&#8203;5903](https://github.com/nats-io/nats-server/issues/5903)) Leafnodes - Support for TLS First on leafnode connections with the `handshake_first` option ([#&#8203;4119](https://github.com/nats-io/nats-server/issues/4119), [#&#8203;5783](https://github.com/nats-io/nats-server/issues/5783)) WebSocket - WebSocket custom response headers ([#&#8203;5230](https://github.com/nats-io/nats-server/issues/5230)) Thanks to [@&#8203;ramonberrutti](https://github.com/ramonberrutti) for the contribution! MQTT - SparkplugB Aware support ([#&#8203;5241](https://github.com/nats-io/nats-server/issues/5241)) ##### Improved General - A graceful shutdown caused by the `SIGTERM` signal will now return exit code 0 instead of exit code 1 ([#&#8203;6336](https://github.com/nats-io/nats-server/issues/6336)) - Attempt to prune the publish permissions cache more than once, reducing the chance it can grow beyond the intended size ([#&#8203;6674](https://github.com/nats-io/nats-server/issues/6674)) JetStream - Improved the performance of subject tracking with a max messages per subject limit of 1 ([#&#8203;6688](https://github.com/nats-io/nats-server/issues/6688)) ##### Fixed General - Server, cluster and gateway names containing spaces will now be rejected, since these can cause issues ([#&#8203;5676](https://github.com/nats-io/nats-server/issues/5676)) JetStream - Message removals due to acks in clustered interest-based or work queue streams are now proposed through Raft ([#&#8203;6140](https://github.com/nats-io/nats-server/issues/6140)) - Ensures that the removal ordering across all replicas is consistent, but may increase the amount of replication traffic - Consistency improvements for the metalayer, streams and consumers ([#&#8203;6194](https://github.com/nats-io/nats-server/issues/6194), [#&#8203;6485](https://github.com/nats-io/nats-server/issues/6485), [#&#8203;6518](https://github.com/nats-io/nats-server/issues/6518)) - A new leader only starts responding to read/write requests once it's initially up-to-date with its Raft log - Also fixes issues where KV creates/updates to a key during leader changes could desync the stream - Replicated consumers should no longer skip redeliveries of unacknowledged messages after a leader change ([#&#8203;6566](https://github.com/nats-io/nats-server/issues/6566)) - Consumer starting sequence is now always respected, except for consumers used for sources/mirrors ([#&#8203;6253](https://github.com/nats-io/nats-server/issues/6253)) - Recovering from a bad message block checksum when there are meant to be zero messages will now correctly populate the first sequence if the last sequence was known from the stream state ([#&#8203;6647](https://github.com/nats-io/nats-server/issues/6647)) - A panic when reloading the config to add a dedicated route has been fixed for systems that have no pinned routes and no system account ([#&#8203;6668](https://github.com/nats-io/nats-server/issues/6668)) - When recovering from filestore blocks, ignore temporary files created as a part of re-compression or re-encryption ([#&#8203;6684](https://github.com/nats-io/nats-server/issues/6684)) ##### Complete Changes ### [`v2.10.29`](https://github.com/nats-io/nats-server/releases/tag/v2.10.29) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.10.28...v2.10.29) #### Changelog Refer to the [2.10 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_210) for backwards compatibility notes with 2.9.x. ##### Go Version - 1.24.2 ##### Fixed JetStream - Fix a regression introduced in v2.10.28 which can affect calculating consumer subject interest ([#&#8203;6845](https://github.com/nats-io/nats-server/issues/6845)) - Consumer state reporting of filtered consumers is now more consistent ([#&#8203;6835](https://github.com/nats-io/nats-server/issues/6835)) - Raft nodes will now correctly report to the upper layer when a preferred node does not become the leader, fixing some issues where multiple assets can believe they are the leader after a scale-up operation ([#&#8203;6851](https://github.com/nats-io/nats-server/issues/6851)) Monitoring - The `connz` endpoint will now return open connections correctly with `state` set to `all` ([#&#8203;6849](https://github.com/nats-io/nats-server/issues/6849)) ##### Complete Changes ### [`v2.10.28`](https://github.com/nats-io/nats-server/releases/tag/v2.10.28) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.10.27...v2.10.28) > \[!IMPORTANT] > This version contains a regression that has since been fixed in 2.10.29. Please upgrade to that version instead. #### Changelog Refer to the [2.10 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new\_210) for backwards compatibility notes with 2.9.x. ##### Go Version - 1.24.2 ##### Dependencies - github.com/nats-io/nats.go v1.41.2 ([#&#8203;6805](https://github.com/nats-io/nats-server/issues/6805)) - github.com/nats-io/nkeys v0.4.11 ([#&#8203;6805](https://github.com/nats-io/nats-server/issues/6805)) - golang.org/x/crypto v0.37.0 ([#&#8203;6805](https://github.com/nats-io/nats-server/issues/6805)) - golang.org/x/sys v0.32.0 ([#&#8203;6805](https://github.com/nats-io/nats-server/issues/6805)) - github.com/nats-io/jwt/v2 v2.7.4 ([#&#8203;6813](https://github.com/nats-io/nats-server/issues/6813)) ##### Improved General - The publish permissions cache should now remain under the max allowed size more aggressively with improved pruning ([#&#8203;6674](https://github.com/nats-io/nats-server/issues/6674)) - It is now possible with service imports to import the same subject from multiple different accounts ([#&#8203;6704](https://github.com/nats-io/nats-server/issues/6704)) - Updating an account claim with a reduced max connection count no longer causes internal clients to be closed, fixing cases where JetStream assets could become unavailable ([#&#8203;6785](https://github.com/nats-io/nats-server/issues/6785)) - `GOMAXPROCS` and `GOMEMLIMIT` are now reported in both `statsz` and `varz` ([#&#8203;6791](https://github.com/nats-io/nats-server/issues/6791)) - Auth tokens are now redacted in trace-level logs for enhanced security ([#&#8203;6808](https://github.com/nats-io/nats-server/issues/6808)) - Trapped signals are now logged at notice level instead of debug ([#&#8203;6800](https://github.com/nats-io/nats-server/issues/6800)) JetStream - Improved purge performance, particularly for KV `PurgeDeletes` calls, with optimised code paths for finding last sequences and reducing allocations ([#&#8203;6801](https://github.com/nats-io/nats-server/issues/6801)) - Improved replicated asset creation performance by campaigning for group leadership more quickly ([#&#8203;6697](https://github.com/nats-io/nats-server/issues/6697)) - Improved the debug log message when resetting a group WAL after failing to truncate ([#&#8203;6705](https://github.com/nats-io/nats-server/issues/6705)) - Improved checking for streams that overlap with JS API or system subjects, so that badly-configured streams should not be able to break the API ([#&#8203;6786](https://github.com/nats-io/nats-server/issues/6786)) - Servers that have been `peer-remove`'d can now be re-admitted automatically after 5 minutes without a server restart ([#&#8203;6815](https://github.com/nats-io/nats-server/issues/6815)) - Filestore tombstones for purges are now written asynchronously where possible, improving performance ([#&#8203;6825](https://github.com/nats-io/nats-server/issues/6825)) ##### Fixed General - Fix a possible panic when a subject transform has missing tokens ([#&#8203;6612](https://github.com/nats-io/nats-server/issues/6612)) - Fix a possible panic when adding dedicated routes during a configuration reload ([#&#8203;6668](https://github.com/nats-io/nats-server/issues/6668)) - Data race when shutting down eventing has been resolved ([#&#8203;6620](https://github.com/nats-io/nats-server/issues/6620)) - A deadlock when updating account claims with service imports/exports has now been fixed ([#&#8203;6726](https://github.com/nats-io/nats-server/issues/6726)) - The `jsz` monitoring endpoint now correctly paginates with `offset` ([#&#8203;6794](https://github.com/nats-io/nats-server/issues/6794), [#&#8203;6816](https://github.com/nats-io/nats-server/issues/6816)) JetStream - JetStream is no longer incorrectly disabled when specifying `--js` and `--store_dir` on the command line and then issuing a configuration reload ([#&#8203;6609](https://github.com/nats-io/nats-server/issues/6609)) - Correctly remove messages from an interest-based stream when using `AckAll` consumers ([#&#8203;6587](https://github.com/nats-io/nats-server/issues/6587)) - Preserve the first sequence when rebuilding state due to invalid checksums with no remaining messages ([#&#8203;6647](https://github.com/nats-io/nats-server/issues/6647)) - When recovering from disk, ignore temporary files that can be created during stream compression so that the same blocks do not get loaded more than once ([#&#8203;6684](https://github.com/nats-io/nats-server/issues/6684)) - Do not incorrectly reset group WALs when a new leader sends matching term information after a snapshot ([#&#8203;6691](https://github.com/nats-io/nats-server/issues/6691)) - Corrected a regression in the memory store when purging, aligning it with the filestore behaviour ([#&#8203;6714](https://github.com/nats-io/nats-server/issues/6714)) - When issuing a peer remove on a stream, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers ([#&#8203;6720](https://github.com/nats-io/nats-server/issues/6720)) - When issuing a peer remove on a consumer, the new peer set is now proposed through the NRG layer, potentially avoiding a drift in peers ([#&#8203;6727](https://github.com/nats-io/nats-server/issues/6727)) - A race condition that could result in observer nodes becoming incorrectly elected as a group leader has been fixed when using leafnodes with shared system accounts ([#&#8203;6730](https://github.com/nats-io/nats-server/issues/6730)) - Ensure that duplicate Raft groups are not created for the same asset during a restart ([#&#8203;6732](https://github.com/nats-io/nats-server/issues/6732)) - Allow the use of the extended consumer create API when combining service imports/exports and limited API permissions ([#&#8203;6759](https://github.com/nats-io/nats-server/issues/6759)) - Streams with the `FirstSeq` configured are no longer incorrectly purged after a restart if the stream first sequence still matches the configured first sequence ([#&#8203;6753](https://github.com/nats-io/nats-server/issues/6753)) - Correctly write tombstones when purging and compacting, fixing a bug that could result in some deleted messages returning if the stream index had to be rebuilt ([#&#8203;6685](https://github.com/nats-io/nats-server/issues/6685)) - The memory store no longer leaks memory tracking deleted sequences after a full stream purge ([#&#8203;6769](https://github.com/nats-io/nats-server/issues/6769)) - Correctly handle acks for subjects that include a `@` character ([#&#8203;6777](https://github.com/nats-io/nats-server/issues/6777)) - Avoid losing stream sequence numbers of the server is interrupted by generating a new last message block before removing the final remaining block, particularly noticeable with WQ or interest retention policies ([#&#8203;6778](https://github.com/nats-io/nats-server/issues/6778)) - Use the correct floor when using `AckAll` in R1 consumers ([#&#8203;6790](https://github.com/nats-io/nats-server/issues/6790)) - Preserve consumer state when a stream needs to be reset due to a failed catchup ([#&#8203;6796](https://github.com/nats-io/nats-server/issues/6796)) - Correctly enforce the 32MB maximum publish size limit into JetStream, avoiding filestore corruption from overflowing the maximum record length ([#&#8203;6798](https://github.com/nats-io/nats-server/issues/6798)) - Push consumers are no longer incorrectly marked as inactive after a delivery failure if there is continued interest ([#&#8203;6807](https://github.com/nats-io/nats-server/issues/6807)) - Internal clients for JetStream are no longer closed unexpectedly after updating an expired account claim ([#&#8203;6817](https://github.com/nats-io/nats-server/issues/6817)) - Fixed a panic that could potentially occur when starting clustered consumers when the metalayer is shutting down ([#&#8203;6823](https://github.com/nats-io/nats-server/issues/6823)) - Fixed a bug in subject tree intersection that could miss some subjects when looking for first matching messages matching `FilterSubjects` ([#&#8203;6828](https://github.com/nats-io/nats-server/issues/6828), [#&#8203;6827](https://github.com/nats-io/nats-server/issues/6827)) Gateways - Fixed a bug that could result in a lost queue subscriptions on gateway connections after a restart or a remote unsubscribe ([#&#8203;6607](https://github.com/nats-io/nats-server/issues/6607)) ##### Complete Changes ### [`v2.10.27`](https://github.com/nats-io/nats-server/releases/tag/v2.10.27) [Compare Source](https://github.com/nats-io/nats-server/compare/v2.10.26...v2.10.27) #### Changelog ##### Go Version - 1.24.1 ##### CVEs - This release contains fixes for CVE-2025-30215, a CRITICAL severity vulnerability affecting all NATS Server versions from v2.2.0, prior to v2.11.1 or v2.10.27. ##### Fixed JetStream - Correctly validate the calling account on a number of system API calls - Check system and account limits when processing a stream restore - Fixed a performance regression when using max messages per subject of 1 ([#&#8203;6688](https://github.com/nats-io/nats-server/issues/6688)) ##### Complete Changes </details> <details> <summary>nats-io/nats.go (github.com/nats-io/nats.go)</summary> ### [`v1.47.0`](https://github.com/nats-io/nats.go/releases/tag/v1.47.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.46.1...v1.47.0) #### Changelog ##### ADDED - Core NATS: - Support sending custom WebSocket headers on connect. Thanks [@&#8203;saurabhojha](https://github.com/saurabhojha) for the contribution ([#&#8203;1919](https://github.com/nats-io/nats.go/issues/1919)) ##### FIXED - Core NATS: - Capture async callbacks before pushing on dispatch queue ([#&#8203;1955](https://github.com/nats-io/nats.go/issues/1955)) - Object Store: - Fixed data race when cancelling context while getting object ([#&#8203;1949](https://github.com/nats-io/nats.go/issues/1949)) - JetStream: - Fixed double channel close on simultaneous Stop and Drain ([#&#8203;1953](https://github.com/nats-io/nats.go/issues/1953)) ##### IMPROVED - Clarify `MessagesContext.Next()` doc ([#&#8203;1951](https://github.com/nats-io/nats.go/issues/1951)) ##### Complete Changes ### [`v1.46.1`](https://github.com/nats-io/nats.go/releases/tag/v1.46.1) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.46.0...v1.46.1) #### Changelog ##### FIXED - JetStream: - Add omitempty to AllowMsgTTL and AllowMsgCounter ([#&#8203;1947](https://github.com/nats-io/nats.go/issues/1947)) ##### Complete Changes ### [`v1.46.0`](https://github.com/nats-io/nats.go/releases/tag/v1.46.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.45.0...v1.46.0) #### Changelog ##### Overview This release enables features introduced in [nats-server@v2.12.0](https://github.com/nats-io/nats-server/releases/tag/v2.12.0). Some features, while enabled in the client by adding relevant configuration, have APIs exposed in [synadia-io/orbit.go](https://github.com/synadia-io/orbit.go), namely: - [Distributed Counters](https://github.com/synadia-io/orbit.go/blob/main/counters/README.md) - [Atomic batch publish](https://github.com/synadia-io/orbit.go/blob/main/jetstreamext/README.md#atomic-batch-publishing) ##### ADDED - JetStream: - Stream counters configuration option ([#&#8203;1932](https://github.com/nats-io/nats.go/issues/1932), [#&#8203;1939](https://github.com/nats-io/nats.go/issues/1939)) - New fields in `ClusterInfo` ([#&#8203;1935](https://github.com/nats-io/nats.go/issues/1935)) - `AllowAtomicPublish` stream configuration option ([#&#8203;1940](https://github.com/nats-io/nats.go/issues/1940)) - `PersistMode` stream config option for configurable stream persistence settings ([#&#8203;1943](https://github.com/nats-io/nats.go/issues/1943)) - `AllowMsgSchedules` stream configuration option to enable message scheduling ([#&#8203;1942](https://github.com/nats-io/nats.go/issues/1942)) - Context and timeout options to `Messages.Next()` plus `Fetch` context support ([#&#8203;1938](https://github.com/nats-io/nats.go/issues/1938)) - Support custom name prefix for ordered consumers ([#&#8203;1928](https://github.com/nats-io/nats.go/issues/1928)) - Prioritized priority policy ([#&#8203;1937](https://github.com/nats-io/nats.go/issues/1937)) - KeyValue: - Added KeyValue bucket metadada support ([#&#8203;1944](https://github.com/nats-io/nats.go/issues/1944)) ##### IMPROVED - JetStream: - Add max consumers limit error (code=10026). Thanks [@&#8203;Arlet2](https://github.com/Arlet2) for the contribution ([#&#8203;1922](https://github.com/nats-io/nats.go/issues/1922)) - Return more specific cons info error on ordered consumer recreation ([#&#8203;1931](https://github.com/nats-io/nats.go/issues/1931)) ##### Complete Changes ### [`v1.45.0`](https://github.com/nats-io/nats.go/releases/tag/v1.45.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.44.0...v1.45.0) #### Changelog ##### ADDED - Core NATS: - Handling for maximum account active connections exceeded ([#&#8203;1921](https://github.com/nats-io/nats.go/issues/1921)) - JetStream: - `WithExpectLastSequenceForSubject` publish option ([#&#8203;1920](https://github.com/nats-io/nats.go/issues/1920)) ##### FIXED - Core NATS: - Track delivered count and auto-unsubscribe for channel subscriptions ([#&#8203;1913](https://github.com/nats-io/nats.go/issues/1913)) - Clear status listeners map on `SubscriptionClosed` event to prevent race condition ([#&#8203;1914](https://github.com/nats-io/nats.go/issues/1914)) - Call `ReconnectErrHandler` for initial connection failures with `RetryOnFailedConnect` ([#&#8203;1915](https://github.com/nats-io/nats.go/issues/1915)) - JetStream: - `CreateOrUpdateStream` preserves domain prefix during updates ([#&#8203;1917](https://github.com/nats-io/nats.go/issues/1917)) - Handle empty response when creating a consumer ([#&#8203;1912](https://github.com/nats-io/nats.go/issues/1912)) ##### IMPROVED - KeyValue: - Add test checking KV TTL watcher updates ([#&#8203;1916](https://github.com/nats-io/nats.go/issues/1916)) ##### Complete Changes ### [`v1.44.0`](https://github.com/nats-io/nats.go/releases/tag/v1.44.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.43.0...v1.44.0) #### Changelog #### Overview This PR adds a `PushConsumer` implementation to `jetstream`, allowing easier migration to new API while maintaining usage of push consumers. For now it only supports the callback-based `Consume()`, more consuming options will be added in future releases. ##### ADDED - Core NATS: - `UserCredentialBytes()` `Conn` option ([#&#8203;1877](https://github.com/nats-io/nats.go/issues/1877)) - JetStream: - `PushConsumer` implementation in `jetstream` package - Expose `ClientTrace` in `JetStreamOptions` ([#&#8203;1886](https://github.com/nats-io/nats.go/issues/1886)) - Service API: - Expose `WithEndpointPendingLimits` option ([#&#8203;1899](https://github.com/nats-io/nats.go/issues/1899)) - Legacy KeyValue: - `Error()` method to `KeyLister` and `KeyWatcher` interfaces ([#&#8203;1889](https://github.com/nats-io/nats.go/issues/1889)) ##### FIXED - Core NATS: - Fix timeoutWriter not recovering after first error ([#&#8203;1896](https://github.com/nats-io/nats.go/issues/1896)) - JetStream: - `Consumer.Next()` hangs after connection is closed ([#&#8203;1883](https://github.com/nats-io/nats.go/issues/1883)) - Fixed stream info request for strict mode ([#&#8203;1887](https://github.com/nats-io/nats.go/issues/1887)) - Ordered consumer not closing on connection close ([#&#8203;1885](https://github.com/nats-io/nats.go/issues/1885)) - Return a more appropriate error when Subject Transform is not supported ([#&#8203;1416](https://github.com/nats-io/nats.go/issues/1416)) - Fix subject transform comparison. Thanks [@&#8203;erikmansson](https://github.com/erikmansson) for the contribution ([#&#8203;1907](https://github.com/nats-io/nats.go/issues/1907)) - Legacy JetStream: - Use timeout from `JetStreamContext` if no deadline is set on ctx ([#&#8203;1909](https://github.com/nats-io/nats.go/issues/1909)) - KeyValue: - `Keys()` and `ListKeys()` returning duplicates ([#&#8203;1884](https://github.com/nats-io/nats.go/issues/1884)) - Fix subject prefix for the Create/Update operation in KV store. Thanks [@&#8203;SalvaChiLlo](https://github.com/SalvaChiLlo) for the contribution ([#&#8203;1903](https://github.com/nats-io/nats.go/issues/1903)) ##### CHANGED - Change `DefaultSubPendingMsgsLimit` ([#&#8203;998](https://github.com/nats-io/nats.go/issues/998)) ##### Complete Changes ### [`v1.43.0`](https://github.com/nats-io/nats.go/releases/tag/v1.43.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.42.0...v1.43.0) #### Changelog ##### ADDED - Core NATS: - Add `nc.LocalAddr`, similar to `nc.ConnectedAddr` ([#&#8203;1877](https://github.com/nats-io/nats.go/issues/1877)) ##### FIXED - Service API: - Fix stopping service not unsubscribing from all endpoints. Thanks [@&#8203;arunsworld](https://github.com/arunsworld) for the contribution ([#&#8203;1872](https://github.com/nats-io/nats.go/issues/1872)) - Remove `fmt.Println` from `Service.Stop()` ([#&#8203;1880](https://github.com/nats-io/nats.go/issues/1880)) - Legacy KeyValue: - Fix possible race setting timer in kv.WatchFiltered ([#&#8203;1879](https://github.com/nats-io/nats.go/issues/1879)) ##### Complete Changes ### [`v1.42.0`](https://github.com/nats-io/nats.go/releases/tag/v1.42.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.41.2...v1.42.0) #### Changelog ##### Overview This release adds per-key TTL functionality to key-value stores. It adds: 1. `LimitMarkerTTL` config option to enable automatic tombstone deletion. 2. `KeyTTL` option to `kv.Create()` 3. `PurgeTTL()` option to `kv.Purge()` ##### ADDED - KeyValue: - Added KeyValue per key TTL support and limit markers ([#&#8203;1864](https://github.com/nats-io/nats.go/issues/1864)) ##### Complete Changes ### [`v1.41.2`](https://github.com/nats-io/nats.go/releases/tag/v1.41.2) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.41.1...v1.41.2) #### Changelog ##### ADDED - Core NATS: - Add `nc.RemoveStatusListener()` method ([#&#8203;1856](https://github.com/nats-io/nats.go/issues/1856)) ##### FIXED - Legacy JetStream: - Fix `Fetch` and `FetchBatch` memory leak ([#&#8203;1856](https://github.com/nats-io/nats.go/issues/1856)) - Legacy KeyValue: - Use context in when purging stream in `kv.PurgeDeletes()` ([#&#8203;1858](https://github.com/nats-io/nats.go/issues/1858)) - Bump golang.org/x/crypto to fix vulnerability ([#&#8203;1857](https://github.com/nats-io/nats.go/issues/1857)) ##### Complete Changes ### [`v1.41.1`](https://github.com/nats-io/nats.go/releases/tag/v1.41.1) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.41.0...v1.41.1) #### Changelog ##### FIXED - ObjectStore: - Use default timeout for `ObjectStore.Get` when no deadline is set on ctx ([#&#8203;1850](https://github.com/nats-io/nats.go/issues/1850)) ##### IMPROVED - Remove `golang.org/x/text` dependency ([#&#8203;1849](https://github.com/nats-io/nats.go/issues/1849)) ##### Complete Changes ### [`v1.41.0`](https://github.com/nats-io/nats.go/releases/tag/v1.41.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.40.1...v1.41.0) #### Changelog ##### Overview This release adds consumer priority groups to JetStream, exposing overflow and pinning policies. For more information on consumer priority groups, see [ADR-42](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-42.md). ##### Added - JetStream: - Consumer priority groups with pinned and overflow policies ([#&#8203;1826](https://github.com/nats-io/nats.go/issues/1826)) - `WithDefaultTimeout` option for JetStream API requests ([#&#8203;1843](https://github.com/nats-io/nats.go/issues/1843)) ##### Fixed - KeyValue: - Ensure timer is stopped when watcher is stopped ([#&#8203;1838](https://github.com/nats-io/nats.go/issues/1838)) - ObjectStore: - Ensure object watcher stop closes the updates channel ([#&#8203;1844](https://github.com/nats-io/nats.go/issues/1844)) - Core NATS: - Data race when reading current status in `sub.StatusChanged` and `nc.StatusChanged` ([#&#8203;1841](https://github.com/nats-io/nats.go/issues/1841)) - Reset channel after closing in `ForceReconnect` to avoid panic on subsequent `ForceReconnect` calls ([#&#8203;1842](https://github.com/nats-io/nats.go/issues/1842), [#&#8203;1846](https://github.com/nats-io/nats.go/issues/1846)) ##### Changed ##### Improved - Legacy JetStream: - Cancel `Fetch` and `FetchBatch` on reconnect ([#&#8203;1840](https://github.com/nats-io/nats.go/issues/1840)) - JetStream: - Invalid default in documentation for `OrderedConsumerConfig.InactiveThreshold` ([#&#8203;1845](https://github.com/nats-io/nats.go/issues/1845)) - KeyValue: - Stop the watcher before performing the purge operations for `PurgeDeletes` ([#&#8203;1839](https://github.com/nats-io/nats.go/issues/1839)) ##### Complete Changes ### [`v1.40.1`](https://github.com/nats-io/nats.go/releases/tag/v1.40.1) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.40.0...v1.40.1) #### Changelog ##### Overview This release fixes an issue in legacy JetStream `Subscribe` which did not respect user-set context when creating a consumer. ##### FIXED - Legacy JetStream: - Set context from option when creating consumer in `js.Subscribe` ([#&#8203;1835](https://github.com/nats-io/nats.go/issues/1835)) ##### Complete Changes ### [`v1.40.0`](https://github.com/nats-io/nats.go/releases/tag/v1.40.0) [Compare Source](https://github.com/nats-io/nats.go/compare/v1.39.1...v1.40.0) #### Changelog ##### Overview This release focuses on adding support for new features from [NATS Server v2.11.0](https://github.com/nats-io/nats-server/releases/tag/v2.11.0). This includes: - Per message TTLs - Consumer pause and resume Batch direct get will be released in [orbit](https://github.com/synadia-io/orbit.go). Support for consumer priority groups will be added in the next minor release. ##### Added - JetStream: - Pause and resume JetStream consumer. Thanks [@&#8203;yordis](https://github.com/yordis) for the contribution ([#&#8203;1571](https://github.com/nats-io/nats.go/issues/1571)) - Per message TTL option for JetStream publish ([#&#8203;1825](https://github.com/nats-io/nats.go/issues/1825)) - Timeout option for async publish ([#&#8203;1819](https://github.com/nats-io/nats.go/issues/1819)) - Service API - Support for disabling queue groups at service, group, and endpoint levels ([#&#8203;1797](https://github.com/nats-io/nats.go/issues/1797)) - Core NATS: - `ReconnectErrCB` for handling failed reconnect attempts in a callback. Thanks [@&#8203;sschleemilch](https://github.com/sschleemilch) for the contribution ([#&#8203;1804](https://github.com/nats-io/nats.go/issues/1804)) ##### Fixed - JetStream - Invalid subscription on ordered consumer in leaderless cluster ([#&#8203;1808](https://github.com/nats-io/nats.go/issues/1808)) - Ordered consumer not restarting on no responders ([#&#8203;1827](https://github.com/nats-io/nats.go/issues/1827)) - Avoid ack id collision in PublishAsync ([#&#8203;1812](https://github.com/nats-io/nats.go/issues/1812)) - Possible panic in `Consumer.Fetch` ([#&#8203;1828](https://github.com/nats-io/nats.go/issues/1828)) - Use `resp.Error` to show NATS error in `deleteMsg`. Thanks [@&#8203;imariman](https://github.com/imariman) for the contribution ([#&#8203;1822](https://github.com/nats-io/nats.go/issues/1822)) - KeyValue - Deadlock when fetching keys from KV while messages are deleted/purged ([#&#8203;1824](https://github.com/nats-io/nats.go/issues/1824)) ##### Changed - Bump go version to 1.23 and update dependencies ([#&#8203;1821](https://github.com/nats-io/nats.go/issues/1821)) ##### Complete Changes </details> <details> <summary>stretchr/testify (github.com/stretchr/testify)</summary> ### [`v1.11.1`](https://github.com/stretchr/testify/releases/tag/v1.11.1) [Compare Source](https://github.com/stretchr/testify/compare/v1.11.0...v1.11.1) This release fixes [#&#8203;1785](https://github.com/stretchr/testify/issues/1785) introduced in v1.11.0 where expected argument values implementing the stringer interface (`String() string`) with a method which mutates their value, when passed to mock.Mock.On (`m.On("Method", <expected>).Return()`) or actual argument values passed to mock.Mock.Called may no longer match one another where they previously did match. The behaviour prior to v1.11.0 where the stringer is always called is restored. Future testify releases may not call the stringer method at all in this case. #### What's Changed - Backport [#&#8203;1786](https://github.com/stretchr/testify/issues/1786) to release/1.11: mock: revert to pre-v1.11.0 argument matching behavior for mutating stringers by [@&#8203;brackendawson](https://github.com/brackendawson) in https://github.com/stretchr/testify/pull/1788 **Full Changelog**: https://github.com/stretchr/testify/compare/v1.11.0...v1.11.1 ### [`v1.11.0`](https://github.com/stretchr/testify/releases/tag/v1.11.0) [Compare Source](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.0) #### What's Changed ##### Functional Changes v1.11.0 Includes a number of performance improvements. - Call stack perf change for CallerInfo by [@&#8203;mikeauclair](https://github.com/mikeauclair) in https://github.com/stretchr/testify/pull/1614 - Lazily render mock diff output on successful match by [@&#8203;mikeauclair](https://github.com/mikeauclair) in https://github.com/stretchr/testify/pull/1615 - assert: check early in Eventually, EventuallyWithT, and Never by [@&#8203;cszczepaniak](https://github.com/cszczepaniak) in https://github.com/stretchr/testify/pull/1427 - assert: add IsNotType by [@&#8203;bartventer](https://github.com/bartventer) in https://github.com/stretchr/testify/pull/1730 - assert.JSONEq: shortcut if same strings by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1754 - assert.YAMLEq: shortcut if same strings by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1755 - assert: faster and simpler isEmpty using reflect.Value.IsZero by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1761 - suite: faster methods filtering (internal refactor) by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1758 ##### Fixes - assert.ErrorAs: log target type by [@&#8203;craig65535](https://github.com/craig65535) in https://github.com/stretchr/testify/pull/1345 - Fix failure message formatting for Positive and Negative asserts in https://github.com/stretchr/testify/pull/1062 - Improve ErrorIs message when error is nil but an error was expected by [@&#8203;tsioftas](https://github.com/tsioftas) in https://github.com/stretchr/testify/pull/1681 - fix Subset/NotSubset when calling with mixed input types by [@&#8203;siliconbrain](https://github.com/siliconbrain) in https://github.com/stretchr/testify/pull/1729 - Improve ErrorAs failure message when error is nil by [@&#8203;ccoVeille](https://github.com/ccoVeille) in https://github.com/stretchr/testify/pull/1734 - mock.AssertNumberOfCalls: improve error msg by [@&#8203;3scalation](https://github.com/3scalation) in https://github.com/stretchr/testify/pull/1743 ##### Documentation, Build & CI - docs: Fix typo in README by [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/stretchr/testify/pull/1688 - Replace deprecated io/ioutil with io and os by [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/stretchr/testify/pull/1684 - Document consequences of calling t.FailNow() by [@&#8203;greg0ire](https://github.com/greg0ire) in https://github.com/stretchr/testify/pull/1710 - chore: update docs for Unset [#&#8203;1621](https://github.com/stretchr/testify/issues/1621) by [@&#8203;techfg](https://github.com/techfg) in https://github.com/stretchr/testify/pull/1709 - README: apply gofmt to examples by [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/stretchr/testify/pull/1687 - refactor: use %q and %T to simplify fmt.Sprintf by [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/stretchr/testify/pull/1674 - Propose Christophe Colombier (ccoVeille) as approver by [@&#8203;brackendawson](https://github.com/brackendawson) in https://github.com/stretchr/testify/pull/1716 - Update documentation for the Error function in assert or require package by [@&#8203;architagr](https://github.com/architagr) in https://github.com/stretchr/testify/pull/1675 - assert: remove deprecated build constraints by [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/stretchr/testify/pull/1671 - assert: apply gofumpt to internal test suite by [@&#8203;ccoVeille](https://github.com/ccoVeille) in https://github.com/stretchr/testify/pull/1739 - CI: fix shebang in .ci.\*.sh scripts by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1746 - assert,require: enable parallel testing on (almost) all top tests by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1747 - suite.Passed: add one more status test report by [@&#8203;Ararsa-Derese](https://github.com/Ararsa-Derese) in https://github.com/stretchr/testify/pull/1706 - Add Helper() method in internal mocks and assert.CollectT by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1423 - assert.Same/NotSame: improve usage of Sprintf by [@&#8203;ccoVeille](https://github.com/ccoVeille) in https://github.com/stretchr/testify/pull/1742 - mock: enable parallel testing on internal testsuite by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1756 - suite: cleanup use of 'testing' internals at runtime by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1751 - assert: check test failure message for Empty and NotEmpty by [@&#8203;ccoVeille](https://github.com/ccoVeille) in https://github.com/stretchr/testify/pull/1745 - deps: fix dependency cycle with objx (again) by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1567 - assert.Empty: comprehensive doc of "Empty"-ness rules by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1753 - doc: improve godoc of top level 'testify' package by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1760 - assert.ErrorAs: simplify retrieving the type name by [@&#8203;ccoVeille](https://github.com/ccoVeille) in https://github.com/stretchr/testify/pull/1740 - assert.EqualValues: improve test coverage to 100% by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1763 - suite.Run: simplify running of Setup/TeardownSuite by [@&#8203;renzoarreaza](https://github.com/renzoarreaza) in https://github.com/stretchr/testify/pull/1769 - assert.CallerInfo: micro optimization by using LastIndexByte by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1767 - assert.CallerInfo: micro cleanup by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1768 - assert: refactor Test*FileExists and Test*DirExists tests to enable parallel testing by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1766 - suite.Run: refactor handling of stats for improved readability by [@&#8203;dolmen](https://github.com/dolmen) in https://github.com/stretchr/testify/pull/1764 - tests: improve captureTestingT helper by [@&#8203;ccoVeille](https://github.com/ccoVeille) in https://github.com/stretchr/testify/pull/1741 - build(deps): bump actions/checkout from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in https://github.com/stretchr/testify/pull/1778 #### New Contributors - [@&#8203;greg0ire](https://github.com/greg0ire) made their first contribution in https://github.com/stretchr/testify/pull/1710 - [@&#8203;techfg](https://github.com/techfg) made their first contribution in https://github.com/stretchr/testify/pull/1709 - [@&#8203;mikeauclair](https://github.com/mikeauclair) made their first contribution in https://github.com/stretchr/testify/pull/1614 - [@&#8203;cszczepaniak](https://github.com/cszczepaniak) made their first contribution in https://github.com/stretchr/testify/pull/1427 - [@&#8203;architagr](https://github.com/architagr) made their first contribution in https://github.com/stretchr/testify/pull/1675 - [@&#8203;tsioftas](https://github.com/tsioftas) made their first contribution in https://github.com/stretchr/testify/pull/1681 - [@&#8203;siliconbrain](https://github.com/siliconbrain) made their first contribution in https://github.com/stretchr/testify/pull/1729 - [@&#8203;bartventer](https://github.com/bartventer) made their first contribution in https://github.com/stretchr/testify/pull/1730 - [@&#8203;Ararsa-Derese](https://github.com/Ararsa-Derese) made their first contribution in https://github.com/stretchr/testify/pull/1706 - [@&#8203;renzoarreaza](https://github.com/renzoarreaza) made their first contribution in https://github.com/stretchr/testify/pull/1769 - [@&#8203;3scalation](https://github.com/3scalation) made their first contribution in https://github.com/stretchr/testify/pull/1743 **Full Changelog**: https://github.com/stretchr/testify/compare/v1.10.0...v1.11.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTUuMiIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
kjuulh added 1 commit 2025-03-25 23:31:30 +01:00
Author
Owner

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 7 additional dependencies were updated

Details:

Package Change
github.com/klauspost/compress v1.18.0 -> v1.18.1
github.com/minio/highwayhash v1.0.3 -> v1.0.4-0.20251030100505-070ab1a87a76
github.com/nats-io/jwt/v2 v2.7.3 -> v2.8.0
github.com/nats-io/nkeys v0.4.10 -> v0.4.11
golang.org/x/crypto v0.34.0 -> v0.43.0
golang.org/x/sys v0.30.0 -> v0.38.0
golang.org/x/time v0.10.0 -> v0.14.0
### ℹ Artifact update notice ##### File name: go.mod In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s): - 7 additional dependencies were updated Details: | **Package** | **Change** | | :------------------------------ | :------------------------------------------------- | | `github.com/klauspost/compress` | `v1.18.0` -> `v1.18.1` | | `github.com/minio/highwayhash` | `v1.0.3` -> `v1.0.4-0.20251030100505-070ab1a87a76` | | `github.com/nats-io/jwt/v2` | `v2.7.3` -> `v2.8.0` | | `github.com/nats-io/nkeys` | `v0.4.10` -> `v0.4.11` | | `golang.org/x/crypto` | `v0.34.0` -> `v0.43.0` | | `golang.org/x/sys` | `v0.30.0` -> `v0.38.0` | | `golang.org/x/time` | `v0.10.0` -> `v0.14.0` |
kjuulh force-pushed renovate/all from 9055833c29 to 7269f91552 2025-04-02 02:07:54 +02:00 Compare
kjuulh force-pushed renovate/all from 7269f91552 to f85ef9d79a 2025-04-04 02:07:20 +02:00 Compare
kjuulh force-pushed renovate/all from f85ef9d79a to 4418a1cdfd 2025-04-09 02:07:38 +02:00 Compare
kjuulh force-pushed renovate/all from 4418a1cdfd to ebfa212ada 2025-04-10 02:07:35 +02:00 Compare
kjuulh force-pushed renovate/all from ebfa212ada to 5df9420aba 2025-04-18 02:08:01 +02:00 Compare
kjuulh force-pushed renovate/all from 5df9420aba to 094e3c08d5 2025-04-26 02:08:36 +02:00 Compare
kjuulh force-pushed renovate/all from 094e3c08d5 to 9dbb70666f 2025-05-02 02:07:07 +02:00 Compare
kjuulh force-pushed renovate/all from 9dbb70666f to 8071763059 2025-05-03 02:08:26 +02:00 Compare
kjuulh force-pushed renovate/all from 8071763059 to 524907efa0 2025-05-07 02:07:34 +02:00 Compare
kjuulh force-pushed renovate/all from 524907efa0 to 0b4363d5d9 2025-05-23 02:07:13 +02:00 Compare
kjuulh force-pushed renovate/all from 0b4363d5d9 to 10444ca100 2025-06-04 02:07:32 +02:00 Compare
kjuulh force-pushed renovate/all from 10444ca100 to cc502132ba 2025-06-06 02:07:09 +02:00 Compare
kjuulh force-pushed renovate/all from cc502132ba to 252511a4d0 2025-06-27 02:06:49 +02:00 Compare
kjuulh force-pushed renovate/all from 252511a4d0 to 85dd97f7c4 2025-07-02 02:10:32 +02:00 Compare
kjuulh force-pushed renovate/all from 85dd97f7c4 to 6c70d0892b 2025-07-09 02:07:59 +02:00 Compare
kjuulh force-pushed renovate/all from 6c70d0892b to 8c3084d03d 2025-11-13 02:26:20 +01:00 Compare
kjuulh force-pushed renovate/all from 8c3084d03d to a68663dff4 2025-11-14 02:07:25 +01:00 Compare
kjuulh force-pushed renovate/all from a68663dff4 to e9e367f76a 2025-12-03 02:07:47 +01:00 Compare
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/all:renovate/all
git checkout renovate/all
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kjuulh/ceen#69
No description provided.