github nats-io/nats-server v2.10.0
Release v2.10.0

latest releases: v2.10.23-RC.2, v2.10.23-RC.1, v2.10.22...
14 months ago

Changelog

Downgrade compatibility note

2.10.0 brings on-disk storage changes which bring significant performance improvements. Upgrade existing server versions will handle the new storage format transparently. However, if a downgrade from 2.10.0 occurs, the old version will not understand the format on disk with the exception 2.9.22 and any subsequent patch releases for 2.9. So if you upgrade from 2.9.x to 2.10.0 and then need to downgrade for some reason, it must be back to 2.9.22+ to ensure the stream data can be read correctly.

Go Version

  • 1.21.1

Dependencies

  • github.com/nats-io/nats.go v1.29.0
  • github.com/nats-io/jwt/v2 v2.5.2
  • github.com/nats-io/nkeys v0.4.5
  • github.com/klauspost/compress v1.17.0
  • golang.org/x/crypto v0.13.0

Added

Accounts

  • Add $SYS.REQ.USER.INFO NATS endpoint for user info (#3671)

Auth

Builds

  • Add early build support for NetBSD (#3526) Thanks to @MatthiasPetermann for the contribution!
  • Add early build support for IBM z/OS (#4209) Thanks to @v1gnesh for the contribution!

Cluster

  • Multiple routes and ability to have per-account routes to reduce head-of-line blocking in clustered setups (#4001, #4183, #4414)
  • Support for S2 compression of traffic over route connections (#4115, #4137)

Config

  • Reload server config by sending a message in the system account to $SYS.REQ.SERVER.{server-id}.RELOAD (#4307)

Embedded

  • Add ConnectionDeadline field to User to force server disconnect after deadline (#3580, #3674)

Leafnode

  • Add TLSHandshakeFirst option to perform a TLS handshake before sending connection info (#4119)
  • Support S2 compression of traffic over leafnode connections where the default now is s2_auto to compress relative to the RTT of the hub (#4167, #4230)
  • Allow remotes from same server binding to same hub account (#4259)

Logging

  • Add logfile_max_num server config field to auto-rotate files (#4548)

JetStream

  • Add stream subject transforms (#3814, #3823, #3827, #4035, #4354, #4400, #4403, #4512)
  • Add freeform metadata field to stream and consumer configs (#3797)
  • Add support for consumers filtering on multiple subjects (#3500, #3865, #4008, #4129, #4188)
  • Add original timestamp as header to republished message (#3933) Thanks to @amorey for the contribution!
  • Allow republish for mirroring/sourcing streams (#4010)
  • Add optional S2 stream compression for file store-backed streams (#4004, #4072)
  • Add file store ability to re-encrypt with new encryption keys (#4296)
  • Add embedded option to disable JetStream ASCII art at startup (#4261) Thanks to @renevo for the contribution!
  • Add ability to configure first_seq when creating streams (#4322, #4345)
  • Add sync_internal option to JetStream config (#4483)

Monitoring

  • Add unique_tag field in /jsz and /varz endpoints (#3617)
  • Add $SYS.REQ.SERVER.PING.IDZ NATS endpoint for basic server info (#3663)
  • Add $SYS.REQ.SERVER.<id>.PROFILEZ NATS endpoint for requesting debugging profiles (#3774)
  • Add subscription count to /statz endpoint (#3875)
  • Add Raft query parameter to /jsz to include Raft group info (#3914)
  • Add slow_consumer_stats to the /varz endpoint (#4330)

MQTT

  • Add support for QoS2 exactly-once delivery (#4349, #4440)

Reload

  • Match --signal PIDs with globular-style expression (#4370) Thanks to @jevolk for the contribution!

Subject Mapping

  • Add ability to remove wildcard tokens in subject transforms (#4152)
  • Allows cluster filtering in account subject mapping (#4175)

System Services

  • Add $SYS.REQ.SERVER.<id>.KICK NATS endpoint to disconnect a client by id or by name from the target server (#4298)
  • Add $SYS.REQ.SERVER.<id>.LDM NATS endpoint that sends a “lame duck mode” message to a client by id or name on the target server (#4298)

Windows

  • Add NATS_STARTUP_DELAY env for configurable startup time (#3743) Thanks to @Alberic-Hardis for the contribution!

Improved

Leafnodes

  • Add jitter to leafnode reconnections (#4398)

Logging

  • Add account, stream and consumer name to consumer alignment cleanup warning (#3666) Thanks to @ch629 for the contribution!

JetStream

  • Significant optimisations and reduced memory impact for replicated streams with a large number of interior deletes (common in large KVs), considerably reducing the amount of CPU and memory required to create stream snapshots and smoothing out publish latencies (#4070, #4071, #4075, #4284, #4520, #4553)
  • Improve signaling mechanism for consumers to improve performance and reduce latency (#3706)
  • Allow edit of Stream RePublish (#3811)
  • Add batch completed status to pull consumers (#3822)
  • Improve behavior of stream source consumer creation or config updates on leadership change (#4009)
  • Record the stream and consumer info timestamps (#4133)
  • Allow switching between limits and interest retention policies (#4361)
  • Improve performance of deleting blocks (#4371)
  • Update the way meta indexing is handled for filestore, significantly reducing time to recover streams at startup (#4450, #4481)
  • Add self-healing mechanism to detect and delete orphaned Raft groups (#4510)
  • Improve monitoring of consumers that need to be cleaned up (#4536)

MQTT

  • Optimize retained messages by using KV semantics instead of holding retained messages in memory (#4199, #4228)
  • Support for topics with . character (#4243) Thanks to @petedavis and @telemac for the reports!
  • Set the RETAIN flag when delivering to new subscriptions and clear the flag in all other conditions (#4443)

Profiling

  • Annotate CPU and goroutine profiles with additional asset information to assist with debugging (#4204)
  • Remove unused block profile rate (#4402)

Subject Mapping

  • Subject transform validation and error reporting (#4202)

Fixed

Accounts

Clients

  • Check if client connection name was already set when storing it (#3824)

Leafnode

  • Data race during validation and setup (#4194)

JetStream

  • Check for invalid stream name in sources (#4222)
  • Stream config update idempotency (#4292)
  • Seqset encode bug that could cause bad stream state snapshots (#4348)
  • Ensure stream assignment is set when checking replica count and updating retention (#4391)
  • Hold lock when enforcing message limit on startup (#4469)
  • Fix filestore data race on hash during snapshots (#4470)
  • Use write lock for memory store filtered state (#4498)
  • Fix data race on stream’s clustered filestore sequence (#4508)
  • Fix possible panic when recalculating the first sequence of a subject (#4530) Thanks to @aldiesel for the report!
  • Fix leaking timers in stream sources resulting in runaway CPU usage (#4532)
  • Fix possible panic when consumer is not closed (#4541)
  • Fix data race when accessing consumer assignment (#4547)
  • Fix data race when changing stream retention policy (#4551)
  • Fix data race when loading the next message in memory-based streams (#4552)
  • Prevent forward proposals in consumers after scaling down a stream (#4556)

OSCP

  • Fixed local issuer determination for OCSP Staple (#4355)

Routes

  • Update LastActivity on connect for routes (#4415)

Complete Changes

v2.9.22...v2.10.0

Don't miss a new nats-server release

NewReleases is sending notifications on new releases.