Skip to content

v1.16.0

Compare
Choose a tag to compare
@aricart aricart released this 16 Aug 19:19
· 296 commits to main since this release
f0f7e1d

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