github nats-io/natscli v0.1.0
Release 0.1.0

latest releases: v0.1.5, v0.1.4, v0.1.3...
13 months ago

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

Don't miss a new natscli release

NewReleases is sending notifications on new releases.