Skip to content

Release v3.0

Latest
Compare
Choose a tag to compare
@Kazmirchuk Kazmirchuk released this 23 Dec 16:31

The "near future" has finally come, so here is a new major release with full support for NATS Key/Value Store!

Including support for the newest features in NATS 2.10:

  • subject transforms
  • metadata in streams, consumers and KV buckets
  • stream compression
  • better alignment with JetStream Client API v2

Moreover: nats-tcl is the first among all NATS clients to support KV API v1.1 - the new way to build hub/leaf node deployments based on subject transforms.

New features

Core NATS

  • support for creating a named connection object using TclOO create
  • new cget option -status to get the current connection status
  • new configure option -request_timeout - 10s by default
  • new jet_stream option -api_prefix
  • automatic "garbage collection" of TclOO objects after destroying the "parent" connection object
  • new proc mymethod

JetStream

  • support for ordered consumers per ADR-15 and ADR-17 #26
  • new add_stream options: -mirror, -sources #25 , -mirror_direct, -republish
  • new method stream_direct_get #24
  • new methods account_info, api_prefix, timeout, update_stream, update_consumer
  • new procs: make_stream_source, make_subject_transform, make_republish

Key/Value

  • improved implementation of kv_watcher based on ordered_consumer
  • KV buckets use "Direct Get" under the hood
  • new methods create_kv_aggregate, create_kv_mirror
  • new proc make_kv_origin
  • new watch options -idle_heartbeat and -updates_only

Bugfixes

  • fixed the message headers parser that would fail if a header value contained a colon, or the "Description" header contained a space
  • fix a bug with sync requests that do not return at all, if a user calls disconnect
  • fix a bug when buffered PUBs are not flushed after reconnecting, if there are no SUBs to restore
  • fixed a bug in CloseSocket : don't try to flush the socket while we're reconnecting, and user called disconnect

Warnings

  • metadata is moved from jet_stream class to nats namespace
  • consume is now deprecated - use fetch instead

Plus many more unit tests (233 in total!), improved error handling, documentation and examples.