nats.node

Node.js client for NATS, the cloud native messaging system.

APACHE-2.0 License

Stars
1.5K

Bot releases are hidden (Show)

nats.node - v2.13.0

Published by aricart over 1 year ago

What's Changed

Important and breaking change change in nbc v1.13.0 for those using the pre-release version of ObjectStore functionality. Please read the release notes if using ObjectStore before upgrading.

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.12.1...v2.13.0

nats.node - v2.12.1

Published by aricart over 1 year ago

What's Changed

NBC 1.12.1 enhances KV create entry to retry the operation and update the value if the previous value is a deleted key.

Node JS specific

The objectstore API has requirements on ES ReadableStream and ES crypto. Previous releases of object store functionality relied on web-streams-polifill/ponyfill. This created issues for other downstream consumers. Starting with this release object store on node 16 or better will use built-in stream/web instead. Note that objectstore is not supported in node versions less than 16.

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.12.0...v2.12.1

nats.node - v2.12.0

Published by aricart over 1 year ago

What's Changed

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.11.0...v2.12.0

nats.node - v2.11.0

Published by aricart almost 2 years ago

What's Changed

This release updates nbc to 1.11.0, bringing multiple enhancements to the services api beta. For more information see the release notes.

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.10.3...v2.11.0

nats.node - v2.10.3

Published by aricart almost 2 years ago

What's Changed

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.10.2...v2.10.3

nats.node - v2.10.2

Published by aricart almost 2 years ago

What's Changed

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.10.1...v2.10.2

nats.node - v2.10.1

Published by aricart almost 2 years ago

What's Changed

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.10.0...v2.10.1

nats.node - v2.10.0

Published by aricart almost 2 years ago

What's Changed

The most notable change is the introduction of the NATS service API which makes it even easier to implement services using NATS.

New Contributors

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.9.2...v2.10.0

nats.node - v2.9.2

Published by aricart almost 2 years ago

nats.node - v2.9.1

Published by aricart almost 2 years ago

What's Changed

[BUMP] nbc to 1.9.2 - this release includes fixes for JetStream fetch(), and correctly maps errors related to exceptions thrown while doing initial authentication.

nats.node - v2.9.0

Published by aricart almost 2 years ago

What's Changed

[UPDATE] nbc updated to 1.9.0 - this release contains many enhancements and fixes to JetStream and KV and ObjectStore. See the linked description for more information.

NATS.js Specific Changes

  • [FIX] If a socket error occurred while establishing the handshake it was possible for the client to crash, as it would try to flush the outbound buffer after the socket was nullified. This nullification also bypassed proper socket cleanup, potentially leaking resources. Also fixed was proper notification to the NBC component of the reason for the socket close. See https://github.com/nats-io/nats.js/pull/526 for more information.

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.8.0...v2.9.0

nats.node - v2.8.0

Published by aricart about 2 years ago

What's Changed

  • [UPDATE] nbc to 1.8.0 - this release contains many enhancements and fixes to JetStream and KV. It also implements ObjectStore. See the linked description for more information.

nats.js changes

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.7.1...v2.8.0

nats.node - v2.7.1

Published by aricart over 2 years ago

What's Changed

nats.node - v2.7.0

Published by aricart over 2 years ago

What's Changed

[UPDATE] nbc (nats base client library for JavaScript) to 1.7.0 - there are numerous enhancements and fixes to NATS core, JetStream, and KV. For a complete list of descriptions, please see https://github.com/nats-io/nats.deno/releases/tag/v1.7.0 @aricart in https://github.com/nats-io/nats.js/pull/503

NATS.JS Specific

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.6.1...v2.7.0

nats.node - v2.6.1

Published by aricart over 2 years ago

What's Changed

[UPDATE] nbc to v1.6.1 - for more information see the release notes
[FIX] This release of nats.js adds compatibility with node.js v17.5.0, see release notes above. #484

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.6.0...v2.6.1

nats.node - v2.6.0

Published by aricart over 2 years ago

What's Changed

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.5.0...v2.6.0

nats.node - v2.5.0

Published by aricart almost 3 years ago

What's Changed

This release updates the nats-base-client (NBC) to v1.5.0

Changes to NBC library

These changes are shared by all NATS.io supported JavaScript clients.

Other changes specific to NATS.js

New Contributors

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.4.0...v2.5.0

nats.node - v2.4.0

Published by aricart almost 3 years ago

This release updates NBC to 1.4.0, there are a couple of small fixes and enhancements. Please see https://github.com/nats-io/nats.deno/releases/tag/v1.4.0 for a complete list of changes.

What's Changed

[UPDATE] nbc to 1.4.0

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.3.0...v2.4.0

nats.node - v2.3.0

Published by aricart almost 3 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/nats-io/nats.js/compare/v2.2.0...v2.3.0

nats.node - v2.2.0

Published by aricart about 3 years ago

This release contains a set of changes that are API-breaking for JetStream. Since the JetStream APIs on the JavaScript clients are Preview, only the minor version of the client has been bumped. Because of these changes, you should carefully read the Breaking Changes section to ensure you are not affected.

BREAKING CHANGES

JetStream Push Consumers In Queue Groups

The Push Consumer Queue feature has changed. A new nats-server (2.4.0) has been released that modifies how this feature works.
The new JavaScript clients have been modified to work with the new server and will fail to work with an existing server using push consumers with queue groups.

Previously it was possible to create a push consumer and properly get it working in a queue group with a regular NatsConnection#subscribe or NatsConnection#jetstream()#subscribe() if all queue subscriptions used the same queue name and no plain (non-queue) subscriptions were used.

If the mix of subscriptions and queues referenced the same consumer but provided different queue names or no queue names, the delivery of messages was incorrect and could create conditions where some messages were seen in duplicate or have unexpected side effects.

The new nats-server changes will make an old consumer configuration with a queue group a noop - the server will not send messages to the client. To enable a queue group to work on a consumer:

  • The consumer configuration must specify a deliver_group matching the queue group name.
  • Configurations that use the consumer with a non-matching queue group will be invalid.
  • Configurations that use a queue group consumer without a queue group will be invalid.

The NATS client for JavaScript on 2.2.0 and beyond, enforces the above rules, so an Error is thrown from NatsConnection#jetstream().subscribe() for configurations that try to use the queue group incorrectly.

Because an old server will not report deliver_group for the consumer, any jetstream#subscribe() that attempts to specify a queue group will fail the validation.

If you are creating your own NATS subscription to handle the consumer, and have an old server, you may continue to do that until you upgrade the server, at which point the nats-server will stop delivering messages to your client. Please ensure you don't use the consumer from different queue groups in the meantime.

JetStreamManager#streams#getMessage(number)

This API has been removed (it was deprecated and printing console messages). To retrieve a message by its sequence,
replace with JetStreamManager#streams#getMessage({seq: number}).

JetStream SequencePair was renamed SequenceInfo

This matches changes in the server. These types are referenced from ConsumerInfo.

Other Changes

  • [FIX] #441 - when Istio is booting, it is possible for the socket to close, triggering a catch(err) where the error is undefined - this fix simply aliases that as a connection refused error.

  • [FEAT] Added DeliveryPolicy#LastPerSubject which allows a consumer to get the last message for each subject in a stream.

  • [FEAT] PubAck now reports a domain field representing the JetStream domain if set or returning an empty string. This feature requires a newer server.

  • [FIX] ConsumerConfig now have fields deliver_group, description.