Skip to content

Releases: nats-io/natscli

Release 0.1.5

29 Jul 18:06
v0.1.5
74fd7c7
Compare
Choose a tag to compare

Bug Fixes

  • Various UX and rendering improvements
  • Improve handling of cluster size counts in nats server req commands
  • Improve stdin handling for kv and object 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

13 Mar 08:12
v0.1.4
0345fb1
Compare
Choose a tag to compare

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

16 Feb 13:43
v0.1.3
cc9a0d5
Compare
Choose a tag to compare

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 to nats server report connections allowing filtering like this example nats 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

29 Sep 20:07
v0.1.1
83e349c
Compare
Choose a tag to compare

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

20 Sep 10:01
c1a0c69
Compare
Choose a tag to compare

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 and nats 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 version
  • nats 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 for nats 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 to nats 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 to false 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 jetstreamnow 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 filter
  • nats 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 to nats 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 and nats 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 and nats 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 storage
  • nats 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 in nats server request
  • Fail, rather than hang, nats stream view without a terminal
  • Correctly handle zero time in stream info and stream state
  • Improve handling of authentication tokens in NATS Contexts

New Contributors

Release 0.0.35

04 Nov 17:14
v0.0.35
08972cd
Compare
Choose a tag to compare

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 using nats 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 in nats server reply
  • Show the bucket size in nats kv info
  • Support filtering streams in stream report and stream 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 to nats 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 in nats 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, use nats stream backup|restore or nats 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

Full Changelog: v0.0.34...v0.0.35

Release 0.0.34

09 Sep 15:11
v0.0.34
32b82f7
Compare
Choose a tag to compare

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 on nats 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 the nats 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, use nats stream backup|restore or nats 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

Full Changelog: v0.0.33...v0.0.34

Release 0.0.33

27 May 11:25
v0.0.33
88c6475
Compare
Choose a tag to compare

Enhancements

  • Adds maxbytes to nats bench for NGS support
  • Adds nats account restore to restore a backup made using nats 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 in nats 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 and nats 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 format text 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 from nats 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 and latency 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

18 Apr 11:29
v0.0.32
4e7038f
Compare
Choose a tag to compare

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

Release 0.0.31

15 Apr 09:51
v0.0.31
e27cb21
Compare
Choose a tag to compare

Enhancements

  • Adds a shell completion format output to nats ctx ls
  • Support placing KV and Object Buckets in Clusters and by using Tags
  • Various UX improvements
  • Support loading contexts from a file using --context /path/to/context.json
  • Support adding new streams using a config file created using nats stream info --json
  • Latest nats.go compatability
  • Adds a new nats server check kv command that can check buckets and keys
  • Allow Max Pending to be updated using nats consumer edit
  • Support rendering Tiered account limits
  • Improves the UX of copying contexts by adding a new nats ctx copy command
  • Show additional information in Key-Value and Object bucket info displays
  • Various improvements to nats req including expecting multi replies
  • Allow a maximum bucket size to be specified when adding a object store
  • Render Stream Alternates in stream info
  • Adds a --names flag to consumer list that shows only consumer names
  • Support moving streams between clusters by enabling --cluster and --tag in editing
  • Render placement of streams in nats stream report
  • Show server tags for clustered servers in nats server info
  • Support backing up all streams in an account using the new nats account backup command
  • When an account requires maximum sizes for streams to be set require it in the interactive CLI

Bug fixes

  • Validate the value given in --storage in nats bench to avoid using memory storage when not intended
  • Improve warnings shown when using nats kv info on a bucket that requires a configuration update
  • Improve benchmark startup by synchronising publishers
  • Allow streams with tag placement to be edited
  • Allow nats kv watch to work without specifying key ranges by defaulting to all keys
  • Prevent viewing Work Queue streams that would result in data loss