v1.14.0
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