Skip to content

Releases: nats-io/nats.go

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

Release v1.37.0

13 Aug 10:32
278f9f1
Compare
Choose a tag to compare

Changelog

Added

  • JetStream:
    • CleanupPublisher method for removing internal JetStream subscription (#1690)
    • ConsumeContext.Closed() method for waiting for consume to be closed/drained (#1691)

Fixed

  • JetStream:
    • Fix deadlock when accessing subscriptions map on a consumer (#1671)
    • Fix panic in OrderedConsumer (#1686)
    • Fix setting deliver policy in Fetch() for OrderedConsumer (#1693)
  • Legacy JetStream:
    • Change Fetch and FetchBatch client timeout to a higher value (#1689)

Improved

  • Trim trailing slash if set on server address which can cause errors during lookup (#1654)
  • Fixed README.md formatting. Thanks @patrick-othmer for the contribution (#1692)

Deprecated

  • Deprecate encoded connections (#1674)

Complete Changes

v1.36.0...v1.37.0

Release v1.36.0

14 Jun 11:27
370bc4f
Compare
Choose a tag to compare

Changelog

Fixed

  • JetStream:
    • Set OptStartSeq correctly in OrderedConsumerConfig and simplify ordered consumer creation (#1644, #1645)
    • Fix invalid handling of mismatched sequence when using Messages() for ordered consumer (#1646)

Changed

  • JetStream:
    • Remove ConsumerInfo() calls in Consume() and Messages() after reconnect (#1643)

Improved

  • Fixed compatibility tests (#1637)
  • Fixed comment typos. Thanks @agcom for the contribution (#1638, #1639)

Complete Changes

v1.35.0...v1.36.0

Release v1.35.0

17 May 11:00
1ffb3ac
Compare
Choose a tag to compare

Changelog

Added

  • Service API:
    • Added API to read reply subject from micro.Request. Thanks @mcosta74 for the contribution (#1589)
  • Core NATS:
    • Added ForceReconnect method on connection for manually triggering reconnect (#1624)

Fixed

  • KeyValue:
    • Fixed invalid DiscardPolicy being set when creating a new KeyValue store using the jetstream package. Previously created KV instances will be auto-repaired when calling CreateKeyValue (#1616, #1617)
  • JetStream:
    • Fixed validation for streams, consumers and KV buckets to avoid protocol errors (#1613)
  • Core NATS:
    • Fixed ConnectedCB not being invoked when using RetryOnFailedConnect: true and the initial nats.Connect fails (#1619)

Improved

  • Core NATS:
    • Remove unnecessary allocations from readMIMEHeader (#1609)
  • KeyValue:
  • Legacy JetStream:
    • Added documentation for StreamConfig in jsm.go. Thanks @kazmerdome for the contribution (#1625)

Complete Changes

v1.34.1...v1.35.0

Release v1.34.1

03 Apr 14:03
10381e1
Compare
Choose a tag to compare

Changelog

Fixed

  • JetStream:
    • Fixed async publish error handling on disconnect (#1592)
    • Fixed race condition in Fetch and FetchBatch when using heartbeats (#1601)

Complete Changes

v1.34.0...v1.34.1

Release v1.34.0

20 Mar 21:24
33316cd
Compare
Choose a tag to compare

Changelog

Added

  • Core NATS:
    • StatusChanged method for subscription event notifications (#1570)
    • ClientTLSConfig option for setting TLS config with callbacks in Connect (#1413)

Fixed

  • Object Store:
    • Add missing Compression struct tag (#1559)
  • Legacy JetStream:
    • Fetch and FetchBatch will no longer publish a pull request if the subscription is closed or draining (#1582)
  • Service API:
    • Fixed incorrect error handling when creating a service. Thanks @ramonberrutti for the contribution (#1585)

Improved

  • Object Store:
  • Add testing section and format CONTRIBUTING.md. Thanks @yordis for the contribution (#1574)
  • Improved performance of respToken in muxer. Thanks for the report @chgz (#1575)
  • Fixed typos in comments. Thanks @paoloteti for the contribution (#1581)

Complete Changes

v1.33.1...v1.34.0

Release v1.33.1

16 Feb 15:06
8805fd6
Compare
Choose a tag to compare

Changelog

Overview

This release fixes v1.33.0 release which was re-released with different tag, causing checksum mismatch when running go get github.com/nats-io/nats.go@v1.33.0.

Complete Changes

v1.33.0...v1.33.1

Release v1.33.0

14 Feb 13:13
a91a735
Compare
Choose a tag to compare

Changelog

Overview

This release introduces significant documentation improvements across jetstream package components (JetStream, Object Store, and KeyValue).

Added

  • JetStream:
    • TermWithReason method on JetStream message (#1539)
    • Timestamp fields on stream and consumer infos (#1540)
    • FetchHeartbeat option for Fetch and FetchBytes (#1548)
  • Object Store:
    • Compression option for object store. Thanks to @johbar for the contribution (#1544)
    • UpdateObjectStore and CreateOrUpdateObjectStore methods (#1550)
  • KeyValue:
    • UpdateKeyValue and CreateOrUpdateKeyValue methods (#1549)

Fixed

  • JetStream:
    • Fixed Drain() infinite loop and add test for concurrent Next() calls. Thanks to @mdawar for the contribution (#1525)
    • Fixed race condition when resetting ordered consumer (#1526)
  • Object Store:
    • Fixed hardcoded read deadline when reading an object (#1531)

Improved

  • Refactored and improved documentation across jetstream package (JetStream, KeyValue and ObjectStore) (#1532, #1537, #1551, #1553, #1555)
  • Change "unsafe" comment on nats.Secure connect option. Thanks to @thorntonmc for the contribution (#1529)
  • Fixed documentation typos across the codebase. Thanks to @fancycode for the contribution (#1547)

Complete Changes

v1.32.0...v1.33.0