Release v2.7.0
Changelog
Notice for JetStream Users
See important note if using LeafNode regarding domains.
Go Version
- 1.17.6: Both release executables and Docker images are built with this Go release.
Added
- Configuration:
- Ability to configure account limits (
max_connections
,max_subscriptions
,max_payload
,max_leafnodes
) in server configuration file (#2755)
- Ability to configure account limits (
- JetStream:
- Overflow placement for streams. A stream can now be placed in the closest cluster from the origin request if it can be placed there (#2771, #2779)
- Support for ephemeral Pull consumers (client libraries will need to be updated to allow those) (#2776)
- New consumer configuration options (#2776):
- For Pull Consumers:
MaxRequestBatch
to limit the batch size any client can requestMaxRequestExpires
to limit the expiration any client can request
- For ephemeral consumers :
InactiveThreshold
duration that instructs the server to cleanup ephemeral consumers that are inactive for that long
- For Pull Consumers:
- Ability to configure
max_file_store
andmax_memory_store
in thejetstream{}
block as strings with the following suffixesK
,M
,G
andT
, for instance:max_file_store: "256M"
. Thanks to @hooksie1 for the contribution (#2777) - Support for the JWT field
MaxBytesRequired
, which defines a per-account maximum bytes for assets (#2779)
- MQTT:
- TLS:
- Ability to rate-limit the clients connections by adding the
connection_rate_limit: <number of connections per seconds>
in thetls{}
top-level block. Thanks to @julius-welink for the contribution (#2573)
- Ability to rate-limit the clients connections by adding the
Improved
- JetStream:
- MemStore is improved in the presence of a lot of interior delete messages, which could happen for instance with the use of KV store (#2752)
- Pull consumers behavior: more resilient, better at waiting request management, and the ability to determine and watch interest cross account (#2776)
- In clustering mode, with streams with replication factor greater than 1, a server will now use much less memory. For instance: 1,000 streams, with 10 consumers each would use about 15GB of memory, with this change memory usage would go down to about 1.5GB (#2775)
- Monitoring:
- Make the HTTP(s) monitoring endpoints available before starting JetStream to be able to monitor whether it is available during startup and recovery of streams. This could help with health probes (#2782)
- Websocket:
Changed
- JetStream:
- JetStream API traffic will now be denied across leaf nodes, unless the system account is shared and the availability domain is identical (#2693)
Updated
- Some dependencies (#2727)
Fixed
- JetStream:
- Possible panic "could not decode consumer snapshot". Thanks to @raoptimus for the report (#2738)
- Added missing entries to stream and consumer list requests (#2739)
- Interest across gateways that would prevent a push consumer from receiving messages. Thanks to @ZMing316 for the report (#2750)
- Stream could "stall" after printing warnings such as "AppendEntry failed to be placed on internal channel" (#2751)
- Stream (with
WorkQueue
retention policy) could have its first/last sequences reset to 0 after a non-clean server restart, causing pull subscriptions to fail getting newly published messages (#2753) - Stall of consumers after getting a "partial cache" error message in the server log. Thanks to @rino-pupkin, @raoptimus, @broken-ufa and @abishai for the report (#2761)
- Large number of ephemeral consumers could exhaust Go runtime's maximum threads. Thanks to @rh2048, @OpenGuidou for the report (#2764)
- Restarting a cluster with lots of streams/consumers could cause routes to break with "write deadline" in some situations (#2780)
- Changes to inter-process communications could solve some issues caused by inability to send messages to internal Go channels (#2775, #2780)
- A consumer's number of pending messages (or "Unprocessed Messages" in NATS cli) could be wrong when the consumer was created with inflight messages. Stepping down of the consumer leader would solve the discrepancy (#2776)
- Possible file store deadlock in when trying to rebuild some state (#2781)
- Monitoring:
- TLS:
- When setting
verify_and_map
totrue
, if a connection connects with a certificate with an ID matching an existing user, but that user'sallowed_connection_types
is specified and does not have the type of the connection trying to connect, the server would panic (#2747)
- When setting
- Check for
no_auth_user
should be done only when no authentication at all is provided by the connection (#2744) - System account issue where the wrong structure was updated (#2757)
- Broken link to monitoring documentation. Thanks to @kfabryczny for the contribution (#2766)