Skip to content

Releases: nats-io/nats.go

Release v1.31.0

15 Oct 18:59
8712190
Compare
Choose a tag to compare

Changelog

Added

  • Core NATS:
    • TLSHandshakeFirst option to perform TLS handshake before receiving the INFO protocol message. Note: This option is not yet available in nats-server (#1433)
  • JetStream:
    • CreateOrUpdateStream helper function to create a stream if it does not exist or update an existing stream. Thanks to @samanebi for the contribution (#1395)

Fixed

  • Test (dev) dependencies are no longer added to go.mod when using nats.go. Thanks to @masumomo for the contribution (#1441)
  • JetStream:
    • Panic on Consumer.Info() when empty response and errors are returned (#1426)
    • Invalid handling of heartbeats in Consume and Messages (#1428)
    • Properly recreating ordered consumers on server restart (#1425)
  • Legacy JetStream:
    • Panic on ConsumerInfo() when empty response and errors are returned (#1426)

Improved

  • Fixed typos in jetstream/README.md. Thanks @cbrake for the contribution (#1436)
  • Updated client dependencies list (#1439, #1440)

Complete Changes

v1.30.2...v1.31.0

Release v1.30.2

27 Sep 08:46
9e5e706
Compare
Choose a tag to compare

Changelog

Fixed

  • JetStream:
    • Fixed backwards compatibility issue when creating streams with sources on nats-server 2.9.x (#1420)

Complete Changes

v1.30.1...v1.30.2

Release v1.30.1

25 Sep 14:10
a6bb6fa
Compare
Choose a tag to compare

Changelog

Fixed

  • JetStream:
    • Fixed validation on nats.PullHeartbeat() causing pull heartbeat not being validated against deadline from nats.Context() (#1414)

Complete Changes

v1.30.0...v1.30.1

Release v1.30.0

20 Sep 09:28
67a55c2
Compare
Choose a tag to compare

Changelog

Overview

This release focuses on adding features introduced in nats-server@v2.10.0. Among other things, this includes setting multiple filter subjects for a consumer, configuring stream subject transform, as well as setting stream and consumer metadata.

Added

  • JetStream:
    • SubjectTransform support on streams (#1200)
    • SubjectTransforms on mirrors and sources (#1359, #1404)
    • Multiple subject filters on consumers (#1214)
    • Setting Compression type on StreamConfig (#1405)
    • Setting FirstSeq on StreamConfig (#1405)
    • Setting ConsumerLimits on StreamConfig (#1405)
    • CreateConsumer and UpdateConsumer methods (#1379)
    • Support for stream and consumer metadata (#1384)
  • ObjectStore:
    • Support for object store and object metadata (#1385)
  • Service API (micro):
    • Customizing queue groups per service, group and endpoint (#1401)
  • Legacy JetStream:
    • SubjectTransform support on streams (#1200)
    • SubjectTransforms on mirrors and sources (#1359)
    • Multiple subject filters on consumers (#1214)
    • Setting Compression type on StreamConfig (#1405)
    • Setting FirstSeq on StreamConfig (#1405)
    • Setting ConsumerLimits on StreamConfig (#1405)
    • Setting heartbeats in Fetch and FetchBatch in legacy API (#1402)

Complete Changes

v1.29.0...v1.30.0

Release v1.29.0

13 Sep 10:32
ae58508
Compare
Choose a tag to compare

Changelog

Overview

With this release, Object Store is out of experimental preview. Additionally, jetstream package now supports KeyValue stores. Object store will be added to jetstream in future release.

Added

  • JetStream:
    • KeyValue is now available as part of jetstream (#1362)
  • KeyValue:
    • UpdatesOnly option for KV watchers (#1378)
  • ObjectStore:
    • UpdatesOnly option for object store watchers (#1377)
  • Core NATS:
    • Invoke ErrorHandler() on preparing connection string when reconnecting (#1397)

Improved

  • Fixed several flaky tests (#1374, #1380)
  • Improve comment on MaxReconnects. Thanks @mojixcoder for the contribution (#1394)
  • Typos in comments and error messages across the code base. Thanks @paoloteti for the contribution (#1381)
  • JetStream:
    • Fix typo in doc comment for SkipConsumerLookup. Thanks to @4nte for the contribution (#1355)
    • Remove doubled error handling. Thanks @samanebi for the contribution (#1387)
  • ObjectStore:

Changed

  • ObjectStore:
    • Remove experimental notice from object store (#1399)
  • Core NATS:
    • Use default value for FlusherTimeout instead of 0 (#1398)

Fixed

  • JetStream:
    • Fixed deadlock when acknowledging a message which was previously acknowledged. Thanks @Zamony for the contribution (#1364)
  • Service API (micro):
    • Fixed possible panic in custom error handlers (#1371)
  • Legacy JetStream:
    • Fixed ordered consumer not being recreated after context timeout (#1360)

Complete Changes

v1.28.0...v1.29.0

Release v1.28.0

20 Jul 10:22
3e4bc5a
Compare
Choose a tag to compare

Changelog

Overview

This release focuses on a set of changes and improvements in new JetStream API. With this release, JetStream API is out of preview.
Additionally, with this release support for go version < 1.18.0 is dropped, due to usage of any type in codebase.

Added

  • JetStream:
    • HeadersOnly field on OrderedConsumerConfig (#1327)
    • WithStreamListSubject() option to filter results of ListStreams() and StreamNames() by stream name (#1312)

Improved

  • Added dev and main branches of nats-server to tests in CI (#1336)
  • Core NATS:
    • Fixed incorrect test case in parse_test.go. Thanks @YukiBobier for the contribution (#1334)
  • JetStream:
    • Fix typos and doc comments in new JetStream API. Thanks @mdawar for the contribution (#1339)
    • Fixed and slightly enhanced the basic example in jetstream package. Thanks to @pwntr for the contribution (#1340)
    • Improvements in in jetstream/README.md (#1347, #1350)

Changed

  • Replace interface{} with any across the codebase (#1332)
  • JetStream:
    • [BREAKING CHANGE] Move NakWithDelay to separate method, instead of it being an option on Nak() (#1337)
    • [BREAKING CHANGE] Simplified API for listing streams and stream names (#1312)
    • Add default timeout when context.Background() or context.TODO() is used (#1348)

Fixed

  • JetStream:
    • Create consumer when calling OrderedConsumer() (#1317)
    • Unset start time for ordered consumer on reset (#1341)
    • Fixed Next() blocking indefinitely after calling Stop(). Thanks @mdawar for the contribution (#1344)
    • Invalid missing heartbeat errors in Consume() (#1345)
    • Fixed PublishAsync() blocking published due to PublishAsyncMaxPending not being reset on reconnect (#1346)
  • Legacy JetStream:
    • Fixed PublishAsync() blocking published due to PublishAsyncMaxPending not being reset on reconnect (#1346)

Complete Changes

v1.27.1...v1.28.0

Release v1.27.1

22 Jun 14:29
e867644
Compare
Choose a tag to compare

Changelog

Improved

  • JetStream Simplified API:
    • Fixed unit from kB to B for FetchBytes() in jetstream/README.md. Thanks @fabiant7t for the contribution! (#1329)
    • Add param names in API interfaces to better document the code (#1316)

Fixed

  • JetStream Simplified API:
    • Use custom inbox prefix set on nats.Conn for pull requests. Thanks @oderwat for the contribution! (#1322)
  • Object Store:
    • Fixed race condition in object store when nats.Context is used. Thanks @anthonyjacques20 for the contribution! (#1314)
  • JetStream:
    • Fixed creating a consumer with Durable not set on server versions prior to 2.9.0 (#1325)

Complete Changes

v1.27.0...v1.27.1

Release v1.27.0

12 Jun 13:41
b2d067b
Compare
Choose a tag to compare

Changelog

Overview

This release focuses on improvements to new JetStream API and Service API (micro) preview functionalities.

Added

  • JetStream Simplified API:
    • StreamNameBySubject() method for stream discovery based on provided subject (#1292)

Improved

  • JetStream Simplified API:
    • Simplified lock handling for Consume() and Messages() (#1303)

Changed

  • JetStream Simplified API:
    • [BREAKING CHANGE] Renamed AddConsumer to CreateOrUpdateConsumer. This change is introduced in anticipation for separation of create and update operations in nats-server (#1300)
    • [BREAKING CHANGE] Change default AckPolicy to AckPolicyExplicit (#1278)
    • [BREAKING CHANGE] Fixed typo in PullThresholdBytes type name (#1300)
    • [BREAKING CHANGE] Removed push consumer only fields from ConsumerConfig (#1300)
    • [BREAKING CHANGE] Removed context.Context from PublishAsync and PublishMsgAsync (#1300)
  • Service API (micro):
    • [BREAKING CHANGE] More verbose endpoint INFO schema (#1277)
      • Endpoint metadata was moved from STATS response to INFO response
      • INFO now returns endpoints object, containing subject, name and metatada. This replaces subject field.

Fixed

  • JetStream Simplified API:
    • Fixed data race on ErrNoHeartbeat. Thanks @alexisvisco for the contibution! (#1291)
    • Fixed incorrect example in jetstream/README.md). Thanks @bojanz for the contribution! (#1295)
  • Object Store:
    • Fixed leaking goroutines after calling Put() and PutBytes() (#1282)
  • Flaky tests picking the used port for cluster connections (#1284, #1298)
  • Division by zero fixes in bechmark tests. Thanks @Zamony fot the contribution! (#1293)

Complete Changes

v1.26.0...v1.27.0

Release v1.26.0

23 May 18:42
7c68468
Compare
Choose a tag to compare

Changelog

Overview

This release adds beta functionality of JetStream simplified API. The goal of this API is to simplify and streamline stream and consumer management, as well as leverage pull consumers for continuous message retrieval. We encourage you to give it a try and post your feedback!

You can find more details on the new API here

Added

  • JetStream Simplified API:
  • JetStream:
    • ConsumerName() subscribe option to set Name in ConsumerConfig when creating a consumer (#1263)
    • SkipConsumerLookup() subscribe option to bypass verifying if the consumer exists before consumer creation (#1265)

Improved

  • Added README.md for micro directory (#1271)
  • Refactored internal handler service monitoring setup in micro (#1240)
  • Added goleak to check for leaking goroutines in tests (#1268)

Changed

  • JetStream:
    • Generate consumer name in Subscribe() when name is not provided to leverage 2.9.0 consumer create server API (#1261, #1263)
  • Service API (micro):
    • Removed api_urland SCHEMA endpoint (#1270)
    • Avoid producing nil metadata (#1242)
  • Changed compression library for websockets (#1259)
  • Reload client TLS certificates and Root CAs on reconnect (#1264)

Fixed

  • Object Store
    • Fixed Put purging partial object before acks for all sent chunks were received. This caused leftover chunks to be processed after purge (#1260)
    • Fixed issue in Read where nil was returned instead of context error (#1260)
  • JetStream:
    • Fixed flaky TestJetStreamConcurrentQueueDurablePushConsumers test (#1267)
  • Fixed leaking goroutines in tests (#1268)

Complete Changes

v1.25.0...v1.26.0

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