Skip to content

Releases: nats-io/nats.go

Release v1.25.0

24 Mar 16:32
9f57f78
Compare
Choose a tag to compare

Changelog

Added

  • Service API (micro):
    • Support metadata for services, endpoints and endpoint stats (#1231, #1233)

Improved

  • Fix TestJetStreamStreamInfoWithSubjectDetails test (#1225)
  • Fix typo in JetStream Durable() option comment. Thanks @jlvallelonga fot the contribution (#1229)
  • Bump nkeys to latest version (#1235)

Changed

  • JetStream:
    • Use wildcard subscription for pull subscription and separate inbox per Fetch()/FetchBatch(). Additionaly, FetchBatch() now
      verifies whether a request timeout was received for a current pull request (#1237, #1238)

Complete Changes

v1.24.0...v1.25.0

Release v1.24.0

24 Feb 17:13
7917595
Compare
Choose a tag to compare

Changelog

Added

  • Core:
  • JetStream
    • FetchChan method to utilize non-blocking pull subscription requests (#1211)
  • Service API (micro):
    • ContextHandler helper function which implements micro.Handler and allows passing context.Context to request handler (#1215)

Improved

  • Use go 1.19 in go.mod and skip using deprecated rand.Seed for go version +1.20 (#1209)

Fixed

  • JetStream:
    • Retry recreating ordered consumer on insufficient resources error (#1217)
    • Stream and consumer name validation now checks for space in name, preventing timeouts and returning valid error (#1219)
  • Service API (micro):
    • Avoid panic on schema request when no schemas were given (#1195)
  • KV:
    • Fix CreateKeyValue idempotency check on AllowDirect when upgrading server version to > 2.9.0 Thanks to @dbason for the contribution (#1213)

Complete Changes

v1.23.0...v1.24.0

Release v1.23.0

18 Jan 13:20
966ad0d
Compare
Choose a tag to compare

Changelog

Overview

This release focuses on improvements in micro package, most notably adding a possibility to create a service with multiple endpoints.

Added

  • Service API (micro):
    • Support for multi-endpoint services (#1180)
    • type field in monitoring handlers responses (#1173)

Changed

  • JetStream:
    • Optimize AddConsumer() performance by not sending JS request if consumer config has not changed (#1185)
  • Service API (micro):
    • Use interface instead of struct for micro.Request (#1174)
    • Use time.Time instead of string for Started field in STATS response (#1175)
    • Service schemas are now defined per-endpoint.

Improved

  • Check whether credentials in nats.Connect() are missing before using them (#1181)
  • Reduce the size of the bufio.Reader for message header parsing. Thanks to @thomas-long-f3 for the contribution (#1187)
  • Update go version in go.mod to 1.18 and update go version used by Travis (#1182)
  • Start adopting error wrapping syntax (%w) in various errors (#1182)
  • Added note on disabling reconnect buffer on nats.ReconnectBufSize() (#1169)
  • Fix typos in comments in micro package. Thanks to @chenjpu for the contribution (#1171)

Fixed

  • JetStream
    • Pass opts to ConsumerInfo call in AddConsumer() (#1176)
    • Use custom inbox prefix in async reply. Thanks to @guyguy333 for the contribution (#1190)

Complete Changes

v1.22.1...v1.23.0

Release v1.22.1

22 Dec 14:10
6600948
Compare
Choose a tag to compare

Changelog

Changed

  • Service API:
    • Monitoring subjects for a service are no longer uppercase (#1166)
    • Changed RequestHandler signature to no longer return an error (#1166)

Complete Changes

v1.22.0...v1.22.1

Release v1.22.0

20 Dec 13:24
61a9345
Compare
Choose a tag to compare

Changelog

Overview

This release adds a beta implementation of micro package, which provides API for creating and monitoring microservices on top of NATS connection.

Added

  • Service API beta implementation (#1160)
  • Getters for connection callbacks (#1162)

Complete Changes

v1.21.0...v1.22.0

Release v1.21.0

05 Dec 16:15
6c6add8
Compare
Choose a tag to compare

Changelog

Added

  • ConnectHandler connect option to detect that initial connection was established. This is especially useful when combined with RetryOnFailedConnect (#1133 )
  • IgnoreAuthErrorAbort connect option to prevent aborting reconnect attempts after receiving the same authentication error twice (#1141)
  • SkipTLSHandshake option to CustomDialer. SkipTLSHandshake method can be implemented on a custom dialer to prevent TLS handshake if not needed (#1147)
  • KV:
    • Return ErrKeyExists error when attempting to Create() a KV pair for an existing key (#1135, #1136)
  • JetStream:
    • Add ErrLeadershipChanged error, returned when consumer leadership has changed during a pull request on a consumer. Thanks to @sata-form3 for the contribution (#1151)

Improved

  • Remove deprecated usages of io/ioutil. Thanks to @cesarvspr for the contribution (#1150)
  • Remove experimental notice from KV implementation (#1154)

Complete Changes

v1.20.0...v1.21.0

Release v1.20.0

11 Nov 15:19
5c57d4b
Compare
Choose a tag to compare

Changelog

Changed

  • JetStream:
    • [BREAKING CHANGE] Extract nats: Consumer Deleted server error to ErrConsumerDeleted variable. This error is returned when consumer is deleted while waiting on pull request and was introduced in nats-server v2.9.6 (#1125)

Improved

  • JetStream:
    • Fix broken comments on ErrConsumerNameAlreadyInUse and StreamNameBySubject(). Thanks to @subtle-byte for the contribution (#1128)
  • Core NATS:
    • Improve comment on RetryOnFailedConnect connect option (#1127)

Complete Changes

v1.19.1...v1.20.0

Release v1.19.1

05 Nov 09:31
980f955
Compare
Choose a tag to compare

Changelog

Added

  • JetStream:
    • Expose StreamNameBySubject method on JetStreamContext interface for looking up stream by subject (#1114)
    • Return stream alternates when fetching stream info (#1118)

Changed

  • KV:
    • Use BindStream for watcher so it works with mirrors (#1116)

Fixed

  • KV:
    • Delete key not working correctly across mirrors (#1115)

Complete Changes

v1.19.0...v1.19.1

Release v1.19.0

27 Oct 19:35
Compare
Choose a tag to compare

Changelog

Added

  • KV:
    • Support for KV mirrors and sources (#1112)

Improved

  • JetStream:
    • Comment on InactiveThreshold to align with server version 2.9.0. Thanks to @neilalexander for the contribution (#1106)

Experimental

  • Added Service framework for microservice communication using core NATS. This is an experimental preview and may be changed in future releases (#1111)

Complete Changes

v1.18.0...v1.19.0

Release v1.18.0

12 Oct 18:38
885ad13
Compare
Choose a tag to compare

Changelog

Added

  • JetStream:
    • Support for DiscardNewPerSubject on stream configuration (#1102)
  • KV:
    • KeyValueStores() and KeyValueStoreNames() methods for listing key value buckets (#1088)
    • Bytes() method on KeyValueStatus returning size of the bucket (#1092)

Improved

  • JetStream:
    • Comment on Subscribe() method in JetStream interface now has a better description of the behavior after unsubscribing from a durable consumer. Thanks to @sylr for the contribution (#1100)

Changed

  • JetStream:
    • Ordered consumer is now being recreated on missing heartbeat (#1097)
    • AckNone policy can now be set for pull consumers (#1090)
  • ObjectStore:
    • [BREAKING] ObjectStores() now returns channel of ObjectStoreStatus instead of ObjectStore interface (#1099)
    • [BREAKING] Options on various ObjectStore methods now have individual types (GetObjectOpt, GetObjectInfoOpt and ListObjectsOpt). Only options applicable for a particular method can be used (#1091)
    • [BREAKING] When listing/fetching object info, deleted objects are now hidden by default. New options are added to enable fetching deleted objects (GetObjectInfoShowDeleted(), GetObjectShowDeleted() and ListObjectsShowDeleted() (#1091)

Fixed

  • JetStream:
    • Invalid JSON tag on Tiers field on AccountInfo struct (#1095)

Complete Changes

v1.17.0...v1.18.0