Releases: nats-io/natscli
Release 0.1.6
CVEs
- Vulnerability check warnings for CVE-2024-45337 are addressed by the dependency update to
x/crypto
, although thenats
does not use the affected functionality and is therefore not vulnerable
Full Changelog: v0.1.5...v0.1.6
Release 0.1.5
Bug Fixes
- Various UX and rendering improvements
- Improve handling of cluster size counts in
nats server req
commands - Improve stdin handling for
kv
andobject
commands - Report correct timezone in
nats stream
commands - Make the consumer inactive threshold editable
- Prevent empty subject transform configurations
- Improve handling of KV value sizes
- Documentation fixes
Enhancements
- New
nats server check consumer
command to verify consumer health - Show Consumer limits in
nats stream info
- Support filtering closed connections by reason in
nats server report connections
Release 0.1.4
Bug Fixes
- Improve handling invalid nats context configurations
- Handle Subject Transforms correctly in
nats stream edit
- Avoid some nil pointer exceptions when selecting consumers
Full Changelog: v0.1.3...v0.1.4
Release 0.1.3
Enhancements
- Support
--limit-consumer-inactive
and--limit-consumer-max-pending
for Streams - New command
nats server check credentials
that can monitor a NATS Credentials file - Adds new
--filter
option tonats server report connections
allowing filtering like this examplenats server report connz --filter 'lower(conns.name) matches "surveyor" || conns.ip == "46.101.44.80"'
this uses Expr language syntax to perform arbitrary filters - Support limiting connection reports by username using the new
--username
- Support comma separate list of filter subjects in
nats consumer add
- Support connecting to NATS Servers configured for TLS First using
--tlsfirst
, also supported by contexts - Builds for the s390x architecture
- Support KV compression
Maintenance
- Remove some dependencies
Bug Fixes
- Warn about route asymmetry per cluster rather than per Super Cluster
- Minor UX improvements
- Correctly handle custom Prometheus namespaces in the
nats server check
commands - Major memory use improvement for connections reports
- When editing a single filtered consumer the edit command would incorrectly change it to a multi filter consumer with just 1 match
- Do not prompt for Backoff information when Ack None was chosen for a Consumer
- Fix the
--names
flag when listing Object Bucket contents
Full Changelog: v0.1.1...v0.1.3
Release 0.1.1
Bug Fixes
This fixes the ability to install the command using go install only, otherwise it is identical to Release v0.1.0
Release 0.1.0
Major New Features
- Adds a new
nats micro
command to interact with the new NATS Microservices Framework - Support data translations in
nats sub
,nats req
andnats stream view
by passing messages to external helper commands for rendering. Allowing unpacking protobuf messages and more. See README example. - Adds a per-context color option that shows up in various tables, columner displays, prompts and more to assist with orientating users between multiple environments. Pass
--color
when adding contexts. - Multiple Subject filters are allowed in Consumers (NATS Server 2.10 required)
- Major new transformation features in Mirrors and Sources (NATS Server 2.10 required)
- Metadata in Streams, Consuemrs, KV Buckets and Object Buckets (NATS Server 2.10 required)
Compatability Notes
Many features requires NATS Server 2.10, some of these will fail silently on older servers. Please review these notes carefully for features flagged as needing 2.10.
Creating consumers will fail on NATS Server older than 2.9.x
We used to default to nats server check connection
when invoked as nats server check
but this made discovering our, significant, improvements to monitoring features hard to discover. This release introduce a breaking change that will require monitoring built using just nats server check
to change to nats server check connection
instead.
JetStream User Enhancements
- KV Bucket maximum age is now shown in
kv info
- Renders the
missing
data from stream reports - known clustered streams that did not respond with their information - Adding a stream using
--config stream.json
now supports overriding placement, description, cluster and replicas - Consumer replicas can be edited to facilitate scale-up and down of consumer raft clusters sizes
- Adds
--defaults
options to stream and consumer add commands which will skip all optional prompts nats consumer next
can now Terminate messages using--term
nats account info
now shows the connected domain and server versionnats account tls
can show certificates, validated chains, checks expiration and supports OCSP verification- Support removing placement constraints using
nats stream edit
nats stream find
can now match on Replicas, Mirrors and Sources- Support editing stream republish configurations using
nats stream edit
- Output from
nats consumer info --json
can now be used as input fornats consumer add
- Improve editing UX for Streams and Consumers using commented YAML rather than JSON
- Trace output from
nats kv get --trace
now includes the revision nats stream view
now support viewing Work Queue streams that have the Direct feature enabled- Enable Direct get by default for new streams
- Support creating Named Ephemeral Consumers
- Consumers are added using the new style API subject that allow ACLs against subject filters
- An
expr
based expression language was added tonats stream find
for complex matches. See--help
and the Language Definition - Can detect gaps aka interior deletes in Streams using
nats stream gaps
- Streams with
no_ack
set tofalse
attempting to ingest>
and*
will now fail - Support setting a custom first sequence for new Streams using
--first-sequence
(NATS Server 2.10 required) - Support more ack modes for Pull consumers (NATS Server 2.10 required)
- Support multiple consumer filter subjects (NATS Server 2.10 required)
- Support Stream Compression (NATS Server 2.10 required)
- Support adding metadata to Streams and Consumers (NATS Server 2.10 required)
- Support new Stream Subject Transform features (NATS Server 2.10 required)
Operations Related Enhancements
nats server check jetstream
now also checks all streams for replica health and report if any streams are unhealthy, lagged, have invalid peer counts or have not been seen recently.- Checks under
nats server check
now show descriptions of their metrics in--format text
nats server check stream
can assert based on the number of subjects in the stream- Adds
nats server check msg
that can load specific messages from a stream and assert properties like age, content and more - Client ports are shown in connection reports
nats server request subscriptions
now has an optional subject filternats server report jetstream
will now warn about situations where a leader could never be elected- Support tags, cluster, and server name filters in various
nats server report
commands - Suport filtering empty responses from
nats server req connections
- Rename
nats server raft
tonats server cluster
with backward compatible aliases - Adds
nats server account purge
that can remove all assets related to an account in a cluster - Differences in the
nats server list
that could indicate problems are highlighted - Various tables in
nats server report
andnats server list
are now sorted in a more consistent manner between invocations - The table produced by
nats server list
can now be sorted by cluster name - Report the percentage of errors vs api requests in
nats server report jetstream
- Support reloading server configuring using
nats server config reload
(NATS Server 2.10 required) - Support loading performance profiles from remote servers using
nats server request profile
(NATS Server 2.10 required) nats server req kick
can be used to disconnect a client (NATS Server 2.10 required)- Additional
healthz
options allowing checks to be restricted to a specific Stream or Consumer (NATS Server 2.10 required) - Can view Raft group information using
nats server request jetstream --raft
(NATS Server 2.10 required)
Configuration Context Enhancements
- Supports skipping context loading using
--no-context
- Support editing corrupt contexts
- Improve the UX of editing contexts by using a commented YAML format
- Adds a per-context color option that shows up in various tables, columner displays, prompts and more to assist with orientating users between multiple environments. Pass
--color
when adding contexts. - The
nats context list
command has a number of new rendering formats for integration with scripts
Miscellaneous Enhancements
- Support accessing NATS via Socks5 proxies, like those created using
ssh -D
, in NATS contexts - Support reading data from STDIN for
nats schema validate
- Adds
nats schema req
that can perform schema validation over any request-reply service response nats sub
can now exit after a idle period by passing--wait
nats sub
can now bind to an existing durable by passing--durable
nats sub
can now report on what subjects traffic was seen on using--report-subjects
- Support data translations in
nats sub
andnats req
by passing messages to external helper commands for rendering. Allowing unpacking protobuf messages and more. See README example. - Support opening the monitor port in
nats server run
- Improve using the
nats
command in cron and scripts by disabling the select prompts using--no-select
- Many general UX improvements
nats bench
will now default to file storagenats account info
supports additional user information like permissions, connection expiry and more (Requires NATS Server 2.10)
Bug Fixes
- Fix opting out of including consumers in backups
- Fix the prometheus metric indicating a check status under
nats server check
that was always 0 - When a context edit results in an invalid context, roll back the changes
- Correctly quote paths in
nats server run
on windows - Correctly pass the supplied
--timeout
to the JetStream API client - Prevent ack wait being edited when backoffs are present
- Improve error handling in the
nats latency
command - Ensure adding a pull consumer with a heartbeat fails
- Improve the performance of
nats stream list --names
on large sites - Improve handling
--timeout
on multi response requests innats server request
- Fail, rather than hang,
nats stream view
without a terminal - Correctly handle zero time in
stream info
andstream state
- Improve handling of authentication tokens in NATS Contexts
New Contributors
- @remyleone made their first contribution in #647
- @Jarema made their first contribution in #657
- @neilalexander made their first contribution in #673
- @sethjback made their first contribution in #682
- @lionello made their first contribution in #717
- @davedotdev made their first contribution in #709
- @kmpm made their first contribution in #736
- @mcp5 made their first contribution in #740
- @jperez-igz made their first contribution in #744
- @oderwat made their first contribution in #739
- @maxarndt made their first contribution in #767
- @sebbbastien made their first contribution in #795
- @fabiant7t made their first contribution in #803
- @mdawar made their first contribution in #828
- @caleblloyd made their first contribution in #853
Release 0.0.35
Enhancements
- Support removing server from a cluster using their unique ID using
nats server raft peer-remove
, also show server IDs in several reports - Support requesting
healthz
from servers usingnats server req healthz
- Support the new Discard New Per Subject policy for streams
- Show the server core count in
nats server list
- Makes the request payload available as
.Request
in templates used innats server reply
- Show the bucket size in
nats kv info
- Support filtering streams in
stream report
andstream ls
based on subject filters - Adds a new account level
nats account report statistics
command showing connection information at an account level nats sub
can now take a filter subject even when a stream is selected using--stream
- Default to the
all
start policy when adding consumers - Support performing account data purges using
nats server purge
- Adds a new
nats stream state
command that shows only the state, also--state
flag tonats stream info
- Support enabling Mirror Direct mode when adding a stream
- Support creating mirrors of Key-Value buckets to facilitate read replicas using
nats kv add --mirror
. The intended use case is to facilitate read replicas in a different domain such as when using a branch level Leaf Node - When using the
prometheus
output format innats server check
the namespace for created metrics is now configurable using--namespace
- The
nats bench
command can act against an existing bucket using the new--bucketname
flag - Various UX improvements
Removals
As announced in the previous release a few features are deprecated and removed
- Stream template support were removed
- Remove
nats governor
command - Remove
nats backup|restore
, usenats stream backup|restore
ornats account backup|restore
Bug Fixes
- Improve error handling in connections report
- Do not offer stream retention as an editable property
- Fix some progress bars
- Improve help for duration flags
- Avoid array out of bounds panics in the
nats traffic
command - Improve help output for the reply command
- Improve paged connection reports that would fail when using
nats account report connections
on an account with more than 1000 connections - When waiting for a stream to elect a new leader with the
nats stream cluster down
command we waited 10 Milliseconds instead of 5 seconds
New Contributors
- @rickardgranberg made their first contribution in #594
- @kozlovic made their first contribution in #602
Full Changelog: v0.0.34...v0.0.35
Release 0.0.34
Enhancements
- Support Stream republish configuration
- Support Stream direct access configuration
- Support Stream subject filters in mirror configuration
- Support showing the subjects contained in a Stream using
nats stream subjects
- Show number of subjects held in a Stream when using
nats stream info
- Support delivery group hints in
nats consumer sub
- Support editing various properties on Consumers
- Support
none
ack mode for pull consumers - Support deleting leaderless and otherwise unmanageable Streams and Consumers using
—force
- Support republish features in
nats kv add
- Support listing keys in a bucket using
nats kv ls BUCKET
- Support fetching a specific historic revision of a KV key using the new
—revision
flag onnats kv get
- Adds a new
nats kv revert
command that can retrieve a past revision for a key and publish it as a new put - Support
—last-per-subject
in thenats sub
command - Allow
nats sub
to reference an existing Durable consumer using—durable
- Support excluding certain subjects from being rendered in
nats sub
using the new—ignore-subject
flag - Support showing matching Replies on
nats sub
using the new—match-replies
flag - Support binding to a specific stream in
nats sub
using—stream
- Support testing server subject mappings using
nats server mapping
- Support deleting the selected context when it’s the only context
- Support extended durations on CLI flags like
1y1M1d1s
- Render TLS connection information in
nats account info
- Improve reusability of configurations in
nats server run
- Allow the inbox prefix to be configured from a NATS context
- Improve help output and general CLI flow
Bug Fixes
- Fix handling windows slashes in
nats server run
- Fix benchmarking using multiple subjects and other
nats bench
improvements - Fix
nats sub
when giving a count and—raw
- Warn instead of fail when memory stream backups are requested in
nats account backup
- Fix handling of deny-delete and allow-purge when adding streams
- Fix waiting for a new leader when forcing a leader election
- Various UX improvements
Deprecations
- Deprecate
nats backup|restore
, usenats stream backup|restore
ornats account backup|restore
- Deprecate
nats governor
, to be removed in next release - Deprecate
nats stream template
, to be removed in next release - Now requires at least Go 1.18
New Contributors
- @ramonberrutti made their first contribution in #477
- @AlbericC made their first contribution in #487
- @superfrink made their first contribution in #491
- @philpennock made their first contribution in #495
- @sylr made their first contribution in #519
- @codegangsta made their first contribution in #523
- @lambdaR made their first contribution in #528
- @rodrigc made their first contribution in #535
- @tbeets made their first contribution in #524
- @Haramaty made their first contribution in #542
- @dselans made their first contribution in #531
Full Changelog: v0.0.33...v0.0.34
Release 0.0.33
Enhancements
- Adds
maxbytes
tonats bench
for NGS support - Adds
nats account restore
to restore a backup made usingnats account backup
- When a stream is added using a configuration file and no name is given we now take the name from the configuration file
- Shows the
domain
innats server list
- Support a dry-run mode in Stream and Consumer edit that only shows the differences without applying them,
-1
exit code indicates a difference was found - The
nats kv
andnats obj
commands will now offer a list of buckets when the bucket name is not given - The
nats consumer edit
command can now load a new configuration from file - The
nats server check
commands have a new output formattext
for human friendly output - The NATS connection name used by the CLI can now be set using
--connection-name
nats stream find
can now find streams by subject matches, the--subject
flag was removed fromnats stream list
as it was not functional- Supports the new
MaxRequestMaxBytes
consumer setting - Allow Replicas and Memory storage to be selected for individual consumers
- Supports new expirmental stream republish feature
nats bench
can now publish to multiple subjects
Bug fixes
- UX improvements in kv commands
- Fix
nats stream ls --names
that would list all names twice - Fix the
rtt
andlatency
commands that were printing unrealistically small numbers - Max delivery was not setable when a backoff was not provided
- Various UX improvements to flags and help output
- Terminal detection is done wherever input is asked, thus improving failure modes when run from scripts, cron etc
Release 0.0.32
Enhancements
- Allow a Stream to be placed by
--tag
or--cluster
when restoring from backup - Accept sizes like
1g
,1GB
,1GiB
etc in CLI flags and interactive prompts in more places - When an account requires a max stream size set default to 256MB
Bug Fixes
- Only enforce Stream max age requirement when the account requires it