Releases: nats-io/nats.js
v3.2.0
What's Changed
This release increases stability and adds support for a number of exciting nats-server 2.12 features
JetStream
- feat: Batch publishing support. JetStream now allows you to publish a number of messages atomically in a batch. #322
- feat: add
allow_msg_counter
to stream configurations. This features enables the use of streams as a counter. For an incubating API see orbit counters #317 - feat: add Raft group and traffic account metadata to cluster types #319
- feat: Support for message scheduling by setting the streams
allow_msg_schedules
and usingScheduleOptions
in theJetStreamPublishOptions
. #321 - feat: Added support for
Prioritized
policy for pull consumers #323 - feat(jetstream): Add support to configure
PersistMode
stream configurations #327 - feat: It is now possible to remove stream
mirrors
via update API #320 - fix: NATS server 2.12 changed how pending messages were reported when accessed via the Direct API. #314
Key-Value Store
- feat(kv): introduce key and payload codecs for customizable key-value encoding and decoding #305
- feat(kv): TTL support entries #306
Object Store
- fix:replicas api option was leaking into object store configuration where the only supported value, which was set correctly, is num_replicas. Servers 2.12+ which validate configurations would reject the operation if this value was set. #315
Node Transport
- fix: changed DNS resolution to use dns.lookup() instead of dns.resolveX() as this allows overrides such as /etc/hosts to work properly #310
- fix: ensure proper cleanup of socket in discard() method. In some container setups under Windows. #309
Full Changelog: v3.1.0...v3.2.0
v3.1.0
What's Changed
This release introduces features to Core (tracing), JetStream (per-message ttls, pinned consumers, subject-based sequence constraints) and KV (per-message ttls, timeout support for put/update operations) and improve the reliability of the client.
Core
- feat(core): tracing - Introduced
TraceOptions
inPublishOptions
,RequestOptions
, andRequestManyOptions
to enable message tracing with NATS. Trace messages are sent to atraceDestination
subject and optionally flagged astraceOnly
to avoid delivery and generate trace data only by @aricart in #265 - fix(core): use InstanceType for TE and TD type annotations by @Roseidon in #298
- fix(core): status iterator can now yield a
close
event signaling that the client closed by @aricart in #277 - refactor(core): remove redundant type assertions in Subscription by @aricart in #293
JetStream
- feat(kv,jetstream)Add support for per-message TTLs in KV and JetStream by @aricart in #281
- feat(jetstream): pinned consumers by @aricart in #263
- feat(jetstream): support for pedantic mode in consumer creation by @aricart in #264 and #275
- feat(js): add support for subject-based sequence constraints. These allow constraints for sequences to be applied to a different using a different subject, simplifying constraints for hierarchical subjects by @aricart in #287
- fix(js): improve handling of 409 status and
max_bytes
edge cases by @aricart in #286 - fix(js): update tests to reflect changes in 2.11.6 behavior for
max_waiting
where 409 for exceededmax_waiting
errors are not sent to the client when requests have an expires. This means that consumers will rely on heartbeats to pull again by @aricart in #291 - fix(js): improved the typings for
DirectBatchOptions
types by @aricart in #289 - tests(js): Add test and logic to bypass JetStream checks for bind-only by @aricart in #272
- tests(js): Add timeout tests for JetStream clients and managers by @aricart in #274
KV
- feat(kv,jetstream)Add support for per-message TTLs in KV and JetStream by @aricart in #281
- feat(kv): timeout support for put and update operations by @aricart in #273
Obj
- Update types.ts: clarify timeout in ObjectStorePutOpts by @alexbozhenko in #261
Services
-
fix(service): stop iterators when the subscription closes. by @aricart in #288
-
Update README.md by @alexbozhenko in #262
Transport-Node
- Introduced
NodeTlsOptions
andNodeConnectionOptions
types to handle Node.js-specific TLS configurations, likerejectUnauthorized
. Updatedconnect
, for transport-node, and related logic to support these new options by @aricart in #260
Docs
- doc: add extra link to runtimes to make it more discoverable by @alexbozhenko in #185
- Fix typo in a comment by @williamstein in #266
- Update URL paths for full JetStream examples by @maxdemaio in #267
- fix(doc): runtime was describing
Svc
(the original name of the type) instead ofSvcm
by @aricart in #276 - fix(doc): fixed the deno installation command by @LeUKi in #279
- docs: added new types exposed by the current api by @aricart in #278
- updated docs by @aricart in #280
CI
- chore: remove GitHub action workflows and update package versions by @aricart in #290
- chore: add utility for managing module versions by @aricart in #295
New Contributors
- @williamstein made their first contribution in #266
- @maxdemaio made their first contribution in #267
- @LeUKi made their first contribution in #279
- @Roseidon made their first contribution in #298
Full Changelog: v3.0.2...v3.1.0
v3.0.2
What's Changed
This release fixes an important regression in for JetStream 3.x clients that use fetch()
and next()
which would cause the client to leak memory for each invocation.
This release also fixes two ObjectStore issues:
get()
andwatch()
which could be affected by the server deeming it a slow consumer, and could cause the client to stall.put()
s of very large objects could fail if the server deemed the client to be producing too fast. The current fix sends chunks sequentially instead of a batch which means thatput()
is currently slower than before, but more reliable. Additional investigation on how to improve the performance without overwhelming the server are in the works.
- fix(obj): additional hardening of the object store client by @aricart in #256
- fix(jetstream): add connection close listeners and update package versions by @aricart in #258
Full Changelog: v3.0.0...v3.0.2
obj/3.0.1
What's Changed
This release only includes an update to objectstore that fixes honoring the number of replicas specified.
- Fix support for setting object replicas in ObjectStore by @aricart in #249
- Bump @nats-io/obj version to 3.0.1 by @aricart in #250
- updated dependency readmes. by @aricart in #245
- Refactor npm publish workflow for granular workspaces by @aricart in #251
Full Changelog: v3.0.0...obj/3.0.1
v3.0.0
What's Changed
The 3.0 release reorganizes the NATS JavaScript clients into multiple modules available from two different registries.
While there have been some important refactorings and minor API changes, which will require you to make some changes to migrate
to the new code base, the migration should be easy. The migration process is described here.
In general, most if not all the changes should be straightforward. The best place to start is the main project's readme. Which provides a link to other Readme's for the other modules, which means that information will be focused to the specific functionality (Core, JetStream, Kv, Obj, Services). Likewise, the API documentation is now per module, further reducing what you have to navigate.
The following are a list of changes that enhance the 3.0 client, which are not present on the 2.x series.
- [FIX] [CORE] WebSocket under node doesn't emit close+error (only error) so redials didn't happen by @aricart in #219
- [FEAT] [JS] Refactor consumer options handling to ensure immutability by @aricart in #224
- [FEAT] [JS] expose
retries
on js publish by @aricart in #234 - [FEAT] [JS] expose direct APIs by @aricart in #236
New Contributors
- @zzl221000 made their first contribution in #39
- @caspervonb made their first contribution in #63
- @bligneri made their first contribution in #145
- @alexbozhenko made their first contribution in #162
- @smirnoffkin made their first contribution in #198
- @atbe made their first contribution in #200
- @lukashass made their first contribution in #211
- @jeefy made their first contribution in #227
Full Changelog: release-2024-08-01-17-44-40...v3.0.0
release-2024-08-01-17-44-40
What's Changed
- integrate nats.deno, nats.js and nats.ws transports
- refactoring nats-base-client into different modules (core, jetstream, kv, obj, services)
New Contributors
Full Changelog: https://github.com/nats-io/nats.js/commits/release-2024-08-01-17-44-40