Skip to content

Releases: nats-io/nats.go

Release v1.43.0

03 Jun 08:23
8a48023
Compare
Choose a tag to compare

Changelog

ADDED

  • Core NATS:
    • Add nc.LocalAddr, similar to nc.ConnectedAddr (#1877)

FIXED

  • Service API:
    • Fix stopping service not unsubscribing from all endpoints. Thanks @arunsworld for the contribution (#1872)
    • Remove fmt.Println from Service.Stop() (#1880)
  • Legacy KeyValue:
    • Fix possible race setting timer in kv.WatchFiltered (#1879)

Complete Changes

v1.42.0...v1.43.0

Release v1.42.0

02 May 11:15
70300b2
Compare
Choose a tag to compare

Changelog

Overview

This release adds per-key TTL functionality to key-value stores. It adds:

  1. LimitMarkerTTL config option to enable automatic tombstone deletion.
  2. KeyTTL option to kv.Create()
  3. PurgeTTL() option to kv.Purge()

ADDED

  • KeyValue:
    • Added KeyValue per key TTL support and limit markers (#1864)

Complete Changes

v1.41.2...v1.42.0

Release v1.41.2

17 Apr 16:44
d1cdbf5
Compare
Choose a tag to compare

Changelog

ADDED

  • Core NATS:
    • Add nc.RemoveStatusListener() method (#1856)

FIXED

  • Legacy JetStream:
    • Fix Fetch and FetchBatch memory leak (#1856)
  • Legacy KeyValue:
    • Use context in when purging stream in kv.PurgeDeletes() (#1858)
  • Bump golang.org/x/crypto to fix vulnerability (#1857)

Complete Changes

v1.41.1...v1.41.2

Release v1.41.1

09 Apr 15:33
50e6153
Compare
Choose a tag to compare

Changelog

FIXED

  • ObjectStore:
    • Use default timeout for ObjectStore.Get when no deadline is set on ctx (#1850)

IMPROVED

  • Remove golang.org/x/text dependency (#1849)

Complete Changes

v1.41.0...v1.41.1

Release v1.41.0

03 Apr 14:13
e040f71
Compare
Choose a tag to compare

Changelog

Overview

This release adds consumer priority groups to JetStream, exposing overflow and pinning policies. For more information on consumer priority groups, see ADR-42.

Added

  • JetStream:
    • Consumer priority groups with pinned and overflow policies (#1826)
    • WithDefaultTimeout option for JetStream API requests (#1843)

Fixed

  • KeyValue:
    • Ensure timer is stopped when watcher is stopped (#1838)
  • ObjectStore:
    • Ensure object watcher stop closes the updates channel (#1844)
  • Core NATS:
    • Data race when reading current status in sub.StatusChanged and nc.StatusChanged (#1841)
    • Reset channel after closing in ForceReconnect to avoid panic on subsequent ForceReconnect calls (#1842, #1846)

Changed

Improved

  • Legacy JetStream:
    • Cancel Fetch and FetchBatch on reconnect (#1840)
  • JetStream:
    • Invalid default in documentation for OrderedConsumerConfig.InactiveThreshold (#1845)
  • KeyValue:
    • Stop the watcher before performing the purge operations for PurgeDeletes (#1839)

Complete Changes

v1.40.1...v1.41.0

Release v1.40.1

25 Mar 20:09
5efde11
Compare
Choose a tag to compare

Changelog

Overview

This release fixes an issue in legacy JetStream Subscribe which did not respect user-set context when creating a consumer.

FIXED

  • Legacy JetStream:
    • Set context from option when creating consumer in js.Subscribe (#1835)

Complete Changes

v1.40.0...v1.40.1

Release v1.40.0

24 Mar 13:50
42828a0
Compare
Choose a tag to compare

Changelog

Overview

This release focuses on adding support for new features from NATS Server v2.11.0. This includes:

  • Per message TTLs
  • Consumer pause and resume

Batch direct get will be released in orbit. Support for consumer priority groups will be added in the next minor release.

Added

  • JetStream:
    • Pause and resume JetStream consumer. Thanks @yordis for the contribution (#1571)
    • Per message TTL option for JetStream publish (#1825)
    • Timeout option for async publish (#1819)
  • Service API
    • Support for disabling queue groups at service, group, and endpoint levels (#1797)
  • Core NATS:
    • ReconnectErrCB for handling failed reconnect attempts in a callback. Thanks @sschleemilch for the contribution (#1804)

Fixed

  • JetStream
    • Invalid subscription on ordered consumer in leaderless cluster (#1808)
    • Ordered consumer not restarting on no responders (#1827)
    • Avoid ack id collision in PublishAsync (#1812)
    • Possible panic in Consumer.Fetch (#1828)
    • Use resp.Error to show NATS error in deleteMsg. Thanks @imariman for the contribution (#1822)
  • KeyValue
    • Deadlock when fetching keys from KV while messages are deleted/purged (#1824)

Changed

  • Bump go version to 1.23 and update dependencies (#1821)

Complete Changes

v1.39.1...v1.40.0

Release v1.39.1

19 Feb 16:11
4ba1afe
Compare
Choose a tag to compare

Changelog

Fixed

  • KeyValue:
    • Prevent ListKeysFiltered from returning deleted keys. Thanks @kruegernet for the contribution (#1803)

Improved

  • Remove stale experimental comment in Service API (#1805)

Complete Changes

v1.39.0...v1.39.1

v1.39.0

05 Feb 16:13
901c987
Compare
Choose a tag to compare

Changelog

Overview

This release bumps the minimal go version in go.mod to 1.22.

Added

  • JetStream:
    • Added PullMaxMessagesWithBytesLimit option for Consume and Messages (#1789)
    • Added Metadata to OrderedConsumerConfig. Thanks @mwain for the contribution (#1737)
    • Added JetStream.Options() and JetStream.Conn() methods to JetStream interface (#1792)
  • KeyValue:
    • Added ListKeysFiltered for listing keys with multiple filters. Thanks @somratdutta for the contribution (#1711)

Fixed

  • JetStream:
    • Fixed invalid heartbeat timer for Consumer.Messages() (#1786)
  • ObjectStore:
    • Fixed invalid error being returned from DeleteObjectStore (#1762)
  • WebSockets:
    • Fixed protocol parsing errors with websocket compression and PONGs. Thanks @rsafonseca for the contribution (#1790)
  • Core NATS:
    • Protect against possible nil pointer panic (#1771)

Changed

  • Bump go version to v1.22 (#1773)

Improved

  • Fixed typo in JetStream docs. Thanks @davydog187 for the contribution (#1758)
  • Improved documentation of JetStream Consume and Messages options (#1770)
  • Removed obsolete build tags (#1787)

Complete Changes

v1.38.0...v1.39.0

v1.38.0

17 Dec 16:23
48391f1
Compare
Choose a tag to compare

Changelog

Added

  • Core NATS:
    • Added UserInfoHandler for dynamically setting user/password (#1713)
    • Added PermissionErrOnSubscribe option, causing SubscribeSync to return nats.ErrPermissionViolation on NextMsg() if there was a permission error (#1728)
    • Added Msgs() method on Subscription, returning an iterator (iter.Seq2[*nats.Msg, error]) for the subscription. This method is only available for go version >=1.23 (#1728)
  • KeyValue:
  • Added WatchFiltered method to watch for updates with multiple filters (#1739)

Fixed

  • Core NATS:
    • Fixed closing connections on max subscriptions exceeded (#1709)
    • Removed redundant nil checks. Thanks @ramonberrutti for the contribution (#1751)
    • Add missing nats prefix to error (#1753)
  • JetStream:
    • Fixed PublishAsync not closing done and stall channels after failed retries (#1719)
    • Set valid fetch sequence in ordered consumer's Fetch() and Next() after timeout (#1705)
    • Do not overwrite ordered consumer deliver policy if start time is set (#1742)
    • Fixed race condition in MessageBatch (#1743)
  • Legacy JetStream:
    • Fixed race condition in MessageBatch (#1743)

Changed

  • Legacy Jetstream:
    • Added client retry for jetstream async publish old API. Thanks @pranavmehta94 for the contribution (#1695)

Improved

  • Moved CI to github actions (#1623, #1716)
  • Use errors.New instead of fmt.Errorf to improve efficiency. Thanks @canack for the contribution (#1707)
  • Fixed invalid schemas in Service API documentation (#1720)
  • Added mention of TTL reset in kv.Update method. Thanks @fmontorsi-equinix for the contribution (#1727)
  • Updated installation commands in README.md (#1745)
  • Bump nkeys to v0.4.9 (#1750)

Complete Changes

v1.37.0...v1.38.0