Releases: nats-io/nats.node
v2.8.0
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
- [UPDATE] nkeys.js deps to 1.0.3 by @aricart in https://github.com/nats-io/nats.js/pull/511
- [FEAT] added support for consuming objectstore feat from nbc by @aricart in https://github.com/nats-io/nats.js/pull/515, this required the introduction of a shim
web-streams-polyfill
to support ReadableStreams. Note that objectstore also requires crypto.subtle, which must be client shimmed on node 14. Newer node runtimes provide the shim automatically as part of the built-incrypto
module.
Full Changelog: nats-io/nats.js@v2.7.1...v2.8.0
v2.7.1
What's Changed
- [UPDATE] nbc to 1.7.1 - for a complete list of changes see https://github.com/nats-io/nats.deno/releases/tag/v1.7.1
- [UPDATE] tranport.send() internal API changes by @aricart in https://github.com/nats-io/nats.js/pull/505
v2.7.0
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
- [DEPS] updated build dependencies by @aricart in https://github.com/nats-io/nats.js/pull/492
- [CHORE] nats-server to 2.8.1, dev dependencies, and deno by @aricart in https://github.com/nats-io/nats.js/pull/499
- added test verifying fix under node.js by @aricart in https://github.com/nats-io/nats.js/pull/501
Full Changelog: nats-io/nats.js@v2.6.1...v2.7.0
v2.6.1
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: nats-io/nats.js@v2.6.0...v2.6.1
v2.6.0
What's Changed
- [UPDATE] the nats-base-client is updated to 1.6.0. There are new features for JetStream, compatibility fixes with nats-server version 1.7.1. For more information please see https://github.com/nats-io/nats.deno/releases/tag/v1.6.0
Full Changelog: nats-io/nats.js@v2.5.0...v2.6.0
v2.5.0
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.
- [FEAT] JetStream APIs for JavaScript are no longer preview. Note that Materialized views APIs are marked as beta and subject to change. by @aricart in nats-io/nats.deno#234
- [FEAT] JetStreamManager API added
consumers.update()
. TheConsumerUpdateConfig
provides some introspection into fields that can be modified. Modifying a consumer is only supported on servers 2.6.4 or better. @aricart in nats-io/nats.deno#229 - [CHANGE] JetStreamManager API
streams.update()
now requires the name of the stream. TheStreamUpdateConfig
provides some introspection into fields that can be modified. The previous API is shimmed, however, the shim will be removed on a future release. by @aricart in nats-io/nats.deno#230 and nats-io/nats.deno#235 - [FIX] Fixed an issue where a fast path for text encoding/decoding of NATS protocol messages (non-payload) didn't handle UTF code-points (ie when using username/password that contained these characters). All encoding decoding of protocol messages now uses TextEncoder/Decoder. by @aricart in nats-io/nats.deno#238
- [CHANGE] [BREAKING] [BETA] KV
keys()
now returns an iterator rather than a list of keys. If using the beta API you must change your code as no shim is possible by @aricart in nats-io/nats.deno#240 - [FIX] Documentation typos. by @MrMYHuang in nats-io/nats.deno#244
- [FEAT] added support for custom reviver in JSONCodec by @tommyo in nats-io/nats.deno#242
- [FEAT] added support for KV prefix handling by @aricart in nats-io/nats.deno#239
Other changes specific to NATS.js
- [DOCS]: corrected markdown markup by @jonaslagoni in https://github.com/nats-io/nats.js/pull/467
- [README] Changed
require
to useimport
for code examples by @rauno56 in https://github.com/nats-io/nats.js/pull/471
New Contributors
- @jonaslagoni made their first contribution in https://github.com/nats-io/nats.js/pull/467
- @rauno56 made their first contribution in https://github.com/nats-io/nats.js/pull/471
Full Changelog: nats-io/nats.js@v2.4.0...v2.5.0
v2.4.0
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: nats-io/nats.js@v2.3.0...v2.4.0
v2.3.0
What's Changed
- [UPDATE] nbc to v1.3.1 see the base library has a few small fixes and adds additional JetStream functionality. See https://github.com/nats-io/nats.deno/releases/tag/v1.3.0 and https://github.com/nats-io/nats.deno/releases/tag/v1.3.1 for more information.
- [FIX] explicit check on the result from
extractProtocolMessage
https://github.com/nats-io/nats.js/pull/456 - [FEAT] [NBC] dns-resolve https://github.com/nats-io/nats.js/pull/458
- [FIX] broken link in README by @rjoly-qlik in https://github.com/nats-io/nats.js/pull/463
New Contributors
- @rjoly-qlik made their first contribution in https://github.com/nats-io/nats.js/pull/463
Full Changelog: nats-io/nats.js@v2.2.0...v2.3.0
v2.2.0
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 adomain
field representing the JetStream domain if set or returning an empty string. This feature requires a newer server. -
[FIX]
ConsumerConfig
now have fieldsdeliver_group
,description
.
v2.1.0
This release sports a number of updates enhancing the JavaScript JetStream functionality.
For a complete list of changes, see https://github.com/nats-io/nats.deno/releases/tag/v1.1.0.