Skip to content

Releases: nats-io/nats.deno

v1.14.0

23 May 14:45
fd39765
Compare
Choose a tag to compare

What's Changed

Release 1.14.0 of the NATS Base Client (NBC) has numerous improvements, particularly in the area of JetStream, where a new API is introduced for processing new messages.

JetStream

Release 1.14.0 introduces a new API for processing messages using JetStream. All consumer operations are now pull-based and offer different buffering strategies allowing the application to adopt the mechanism that best suits it.

[FEAT] [JS] new JetStream API that is consumer-centric and provides many UX enhancements for JetStream clients. While this new API is tagged as beta, you are encouraged to transition to the new API, as the subscribe() and pullSubscribe() has been deprecated. See Processing Messages.

[FIX] [JS] Added StoredMessage timestamp returns the ISO message timestamp as provided by the server (time() returns a Date object which will have lower precision) #484

[FIX] [JS] StreamInfo.created to be a string (was marked as Nanos), StreamState first_ts to be a string. #484

[FIX] [JS] remove ack() from a PubAck this feature was never supported by @aricart in #511

[FEAT] [JS] pull consumer deleted notifications by @aricart in #495

[FEAT] [JS] clients are able to add metadata to consumers/streams - this feature requires server 2.10.x by @aricart in #481

[FEAT] [JS] multiple consumer filters (note this feature requires server 2.10.x) by @aricart in #469

[FEAT] [JS] StreamConfig can specify a subject_transform to apply a transform to incoming messages before anything else by @aricart in #494

[FEAT] [JS] StreamSource configurations can specify a SubjectTransformConfig to map a source and destination pattern by @aricart in #494

[FIX] [JS] malformed status created a NaN code by @aricart in #479

Object Store

[FIX] [OS] prevent adding the same object twice but not trigger the prune functionality; thus, data assets are found twice in the stream. The option previousRevision allows the client to specify the revision that the previous object represented (0 for not expecting the object to exist in the stream). If the update of the metadata entry fails, the data chunks are removed by @aricart in #471

[FEAT] [OS] added get/putBlob() convenience methods to object store by @aricart in #491

NATS Core

[CHANGE] [CORE] Previous releases of the JavaScript clients rejected multiple authentication mechanisms. To support upcoming server functionality, this has been relaxed @aricart in #472

[FEAT] [CORE] Msg (the base interface for a NATS message) and its derivates (JsMsg, SrvMsg, KvEntry, etc.) now provide json<T>() and string() methods to decode the payload as a string or encoded JSON by @aricart in #477

[FIX] [CORE] Added a check to createInbox() to reject any prefixes that contain wildcards by @aricart in #478

[FEAT] [CORE] support IPv4 addresses mapped to IPv6 by @aricart in #501

Service Framework

With this release, the service framework is out of beta and released. The final version of the API has some small changes:

[CHANGE] [BREAKING] [SRV] removed apiURL config option and api_url - use metadata on the service by @aricart in #514

[CHANGE] [BREAKING] [SRV] removed schema reporting, configuration, and related types - use metadata on the endpoint by @aricart in #514

[CHANGE] [BREAKING] [SRV] removed endpoint configuration from service config - use addEndpoint() by @aricart in #514

[FIX] [SRV] ServiceMsgImpl was missing access to headers or reply subject by @aricart in #473

[FEAT] [SRV] Added metadata to endpoints and services by @aricart in #492

[FEAT] [SRV] include schema metadata on ServiceSchema by @aricart in #493

Full Changelog: v1.13.0...v1.14.0

v1.13.0

08 Mar 19:24
ab40594
Compare
Choose a tag to compare

What's Changed

This release has a breaking fix to JavaScript clients to the beta functionality of object store - previously JavaScript clients stored entries using the unpadded resource's base64 URL encoded name. Go and other clients stored entries using padding. This means when the clients attempted to read an entry, if the entry would have had padding the JavaScript client would have not been able to find them. Similarly other clients trying to read entries created by JavaScript which would have resulted in names with padding wouldn't have been able to find the entry. This release fixes the JavaScript clients, to properly generate the entry names for reads and writes.

This change also makes it impossible for a JavaScript client to access entries that had the unpadded name. While the functionality is beta, the JavaScript client includes a tool that fixes entries that were written incorrectly. The tool can be run as:

deno run -A https://raw.githubusercontent.com/nats-io/nats.deno/main/bin/fix-os.ts

You must backup your streams before running the tool and possibly upgrade clients to use v1.13.0 to prevent adding additional incorrect entries (if the client is writing them). The tool will find all the metadata entries for the specified object store and fix the ones that require padding. Please refer to the tool's help for more information.

  • [FIX] [BREAKING] [OS] ObjectStore meta subject entries name encoding by @aricart in #490

  • [FIX] duplicate kv/object store lists when unexpected stream types were included by @aricart in #486

  • [TEST] JetStream tests await publish acks by @Jarema in #485

  • [TEST] fixed resource limits on test by @aricart in #487

Full Changelog: v1.12.1...v1.13.0

v1.12.1

21 Feb 13:49
baf5edf
Compare
Choose a tag to compare

What's Changed

  • [FEAT/FIX] [KV] create now re-attempts if the last entry in the KV is deleted or purged by @aricart in #482
  • [BUMP] version by @aricart in #483

Full Changelog: v1.12.0...v1.12.1

v1.12.0

09 Feb 15:26
2f81d4d
Compare
Choose a tag to compare

What's Changed

There's a notable change in this release related to a revert to a strict validation on consumer and stream names introduced here. The current validation aligns with what the nats-cli accepts for stream and consumer names.

Full Changelog: v1.11.0...v1.12.0

v1.11.0

18 Jan 17:24
6368661
Compare
Choose a tag to compare

What's Changed

This release further enhances the beta/experimental service API feature and introduces the capability of hosting multiple endpoints in a single service. This means that stats and schema reporting are now specific to an endpoint, but collected for the entire service on a stats or schema request.

To add an endpoint, addEndpoint() is used. This call takes a simple name, an optional callback (or the return value is an iterator) or a set of options with an optional subject, handler and schema. The name provided to the endpoint is stored and can be used to identify stats collected for the endpoint. By default addEndpoint() on the service adds to an empty group, so the subjects would be flat (not grouped).

To group endpoints in a common subject root, use addGroup() which allows you to specify a subject to be used as prefix. You can endpoints or groups to a group. The full chain of the group to the endpoint determines the subject where the endpoint listens.

Other changes

  • [CHANGE] [SRV] the endpoint configuration in the service is now optional - if specified, the endpoint is added as the default endpoint, but listening on the specified subject. The endpoint configuration now also houses the schema details for the endpoint.
  • [FEAT] [SRV] responses to monitoring/discovery have a type
  • [CHANGE] [SRV] stats and schema, are now per endpoint endpoints in the service's response
  • [FEAT] [SRV] schema now has an api_url field that can be set to any URL where the service developer wants to store/reference documentation. Each endpoint can report its own schema (specified during add or as part of endpoint configuration) under schema

Full Changelog: v1.10.3...v1.11.0

v1.10.3

12 Jan 19:24
ffde2e3
Compare
Choose a tag to compare

What's Changed

  • [FIX] [CORE] prevent the client from closing due to expired credentials if there's a subsequent reconnect after an expired credential by @aricart in #450
  • [FIX] [OS] expose timeout on put, for really large assets, it is possible for the publish request to timeout by @aricart in #457
  • [FIX] [TEST] fixed flapper tests by @aricart in #458
  • [FIX] [DOC] [JS] heatbeat example was not up-to-date, an updated example showing the behavior of missed heartbeats on JS push subscriber. by @aricart in #446

Full Changelog: v1.10.2...v1.10.3

v1.10.2

21 Dec 14:39
d8e555b
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.10.1...v1.10.2

v1.10.1

20 Dec 18:43
ba6863b
Compare
Choose a tag to compare

What's Changed

  • [CHANGE] [SRV] name and id are now case-sensitive @aricart in #441
  • [TEST] [SRV] custom assert messages were not used by @aricart in #440
  • [BUMP] client version to 1.10.1 and nats-server for CI to 2.9.10 by @aricart in #442

Full Changelog: v1.10.0...v1.10.1

v1.10.0

19 Dec 18:32
Compare
Choose a tag to compare

What's Changed

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

  • [FIX] [JS] publish with expect.lastSequence or expect.lastSubjectSequence set to 0 was not honored by @aricart in #433
  • [FEAT] [SERVICE] service framework by @aricart in #383
  • [FEAT] [CORE] added option to customize the jitter setting in RequestMany by @aricart in #405
  • [FIX] [CORE] remove remembering of permissions error by @aricart in #406
  • [CHANGE] [CORE] subscriptions that get a permissions error are now discarded and won't automatically resub in case of a disconnect @aricart in #408
  • [FIX] [CORE] properly resolve the close promise when close() in a disconnected state by @aricart in #415
  • [BUMP] Deno to 1.29.1 and std to 0.168.0 by @aricart in #434
  • [DOCS] update by @aricart in #435

Deno Specific Changes

[FIX] Deno 1.29.1 revealed a Conn leak when the client failed to connect due to an exception. #423

Full Changelog: v1.9.3...v1.10.0

v1.9.3

01 Dec 20:23
12ac9a4
Compare
Choose a tag to compare

What's Changed

  • [FIX] protocol errors shouldn't close() the client by @aricart in #422
  • [internal] pushing a function to a queued iterator that sets an error is ignored until the next yield by @aricart in #420

Full Changelog: v1.9.2...v1.9.3