Skip to content

Releases: nats-io/nats.deno

v1.17.0

20 Sep 20:44
5d15adc
Compare
Choose a tag to compare

What's Changed

This release removes the preview notice on object-store, adds new configuration options to stream configuration, and enhances KV and service APIs.

  • [FEAT] [CORE] [SRV] allow service (micro) API to specify a queue name by @aricart in #590

  • [FEAT] [JETSTREAM] stream compression option by @aricart in #595

  • [FEAT] [JETSTREAM] consumer limits by @aricart in #597

  • [FIX] [JETSTREAM] added JetStreamSubscriptionInfoable to types, as it was needed downstream by @aricart in #576

  • [FEAT] [JETSTREAM] implements support for subject_transforms on StreamSources/Mirrors by @aricart in #589

  • [CHANGE] [JETSTREAM] require consumer/stream names to not contain spaces, newlines, carriage returns or tabs by @aricart in #585

  • [FIX] [JETSTREAM] Fix PullConsumerMessagesImpl not respecting inboxPrefix by @oscarwcl in #580 and @aricart in #581

  • [CHANGE] [JETSTREAM] removed configuration subject_transform_dest - this configuration was not released server and it is superseded by subject_transforms. If you were experimenting with with 2.10.0 features, you will need to migrate to use subject_transforms in 2.10.0 by @aricart in #592

  • [FEAT] [JETSTREAM] [KV] added options for watcher support for all history, last values or updates as well as get notifications on deletes by @aricart in #577

  • [FEAT] [JETSTREAM] [OS] removed preview notice from objectstore functionality. Note that this release implements some changes to the handling of links by @aricart in #596

Other minor fixes

New Contributors

Full Changelog: v1.16.0...v1.17.0

v1.16.0

16 Aug 19:19
f0f7e1d
Compare
Choose a tag to compare

What's Changed

This release contains some important fixes to the handling of connections that fail during handshake (such as when the connection timeout on the nats-server is set to artificially low - or the connect timeout option is artificially low). In most runtimes, this would result in a couple of connect/disconnect/reconnect cycles.

This release also reduces the latency of the client when writing to the network. NATS clients optimize for throughput by reducing the number of socket writes that are performed. Any write triggers a "flusher" operation that will sometime in the future (if the buffer is not full) write to the socket; otherwise, the write is scheduled inline. In previous versions, the flusher functionality was scheduled via a setTimeout() as soon as possible. In most runtimes, this happens almost immediately but varies. This release changes that scheduling to happen via a queueMicrotask(), which improves performance a little bit for Deno and WebSocket clients and hugely for the NodeJS runtime. This means that any data sent to the server will start vacating the client much quicker than it did before and thus improving the client's latency.

Lastly, this release contains a breaking change for the preview of the ObjectStore, see the JetStream section below for more information.

NATS Core

  • [FIX] [CORE] [RequestMany] noMux option elided request payload by @aricart in #550
  • [FIX] [CORE] Fixed an issue with authentication timeouts being properly identified by @aricart in #562
  • [FIX] [CORE] Added additional API to allow discarding transport implementations that don't fail a dial attempt. This feature was added to support a unique behavior in Firefox browser with nats.ws by @aricart in #563
  • [FIX] [CORE] Changed the way the flusher gets triggered to use queueMicrotask() instead of setTimeout() as depending on the runtime (NodeJS) setTimeout doesn't trigger as soon as it is expected by @aricart in #566

JetStream

  • [FIX] [OBJECTSTORE] [BREAKING] fixed name entry generation that was incompatible with other clients - note the migration tool was updated to fix existing entries. Please refer to the pull request for more information by @aricart in #556
  • [DOC] [JETSTREAM] added jsdoc to the ordered consumer options by @aricart in #554
  • [TEST] [JETSTREAM] added tests to verify that ordered consumer by date turns converts to sequence on reset by @aricart in #557
  • [FIX] [JESTREAM] [DOC] Fixed bug in code example and typo by @y2k4life in #559 and #558
  • [FIX] [JETSTREAM] [CONSUMER API] changed ordered consumer implementation to set max_redeliver to 1, and to use mem_storage. This only affects ordered consumers that read via the new consumer API by @aricart in #560
  • [FEAT] [JETSTREAM] stream/consumer info timestamps, stream configuration - this feature is only available on servers 2.10.0 or better (not yet released) by @aricart in #561
  • [FEAT] [JETSTREAM] added additional hints for servers 2.10.0 and better to understand if a consumer is being created or updated - this feature is only available on servers 2.10.0 or better (not yet released) by @aricart in #552
  • [CHORE] [JETSTREAM] added additional constants to JsHeaders, and removed inlined values by @aricart in #551
  • [FEAT] [JETSTREAM] [KV] expose stream metadata - this feature is only available on servers 2.10.0 or better (not yet released) by @aricart in #545
  • [FEAT] [JETSTREAM] [OS] expose stream metadata - this feature is only available on servers 2.10.0 or better (not yet released) by @aricart in #544
  • [BUMP] deno and server versions by @aricart in #568

New Contributors

Full Changelog: v1.15.1...v1.16.0

v1.15.1

22 Jun 21:35
274868a
Compare
Choose a tag to compare

What's Changed

This release has one important fix for a listener memory leak when using the new JetStream APIs next() and fetch(). These changes are part of the nats-base-library.

  • [FIX] allow headers_only on the ordered consumer options for new JetStream API by @aricart in #542
  • [FIX] status iterator doesn't cleanup if the iterator is stopped, effectively leaking memory by @aricart in #547

Full Changelog: v1.15.0...v1.15.1

v1.15.0

15 Jun 21:53
988752d
Compare
Choose a tag to compare

What's Changed

Deno Specific

  • [DENO] optimization improve publish performance by @aricart in #534

Nats-Base-Client

  • [CHANGE] [SRV] [BREAKING] info operation now returns endpoints instead of subjects. Endpoints contain not only the subject for each of the endpoints but also the associated endpoint metadata #523

  • [CHANGE] [SRV] [BREAKING] removed NamedEndpointStats#metadata reference; use EndpointInfo#metadata instead #523

  • [FIX] improved performance on Deno and (other runtimes by a smaller factor) by reducing the number of flusher timers by @aricart in #526 and #527

  • [FIX] [JS] connection drain for consume messages iterators by @aricart in #531

  • [FEAT] [CORE] [JS] it is now possible to publish/reply/etc with a string without using StringCodec by @aricart in #522 and #539

  • [FEAT] [JS] Stream object can now delete a message - also stream info is able to specify info options by @aricart in #524

  • [REFACTOR] The internals of the library have been reorganized, with JetStream and related KV/ObjectStore moved to the jetstream/ directory in the project - This change will facilitate the possible externalizing the JetStream and related views into their own libraries #521 #537 and #538

Other Changes

Full Changelog: v1.14.0...v1.15.0

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