Repository navigation
nestjs-nats-jetstream-transport 2.3.0
@nestjs-plugins/nestjs-nats-jetstream-transport@2.3.0. Existing code needs no changes.
npm i @nestjs-plugins/nestjs-nats-jetstream-transport@^2.3.0Requires Node.js 22 or later. If you are on an older Node version, stay on 2.2.x.
Features
eventHandlerError(server, optional): decides what happens to a message when its@EventPatternhandler fails.{ action: 'term' }stops redelivery.{ action: 'nak', nakDelay?: ms }redelivers the message, after the delay if one is given.- When the option is not set, behavior is the same as before. The message is left unsettled, so with
manualAckit is redelivered afterackWait. See the README section "Handling event handler errors".
jetStreamOptions(client): this option name, which the README already documented, now takes effect.jetStreamOptionstill works and is deprecated.
Bug fixes
close()on the server and client no longer throws when there is no connection. NestJS 8 callsclose()twice on shutdown, which used to throw.- A request/reply payload that is not valid JSON gets an error reply at once. Previously the caller waited for its timeout and an unhandled rejection escaped.
- Stream setup reads every page of the stream list, so an existing stream beyond the first page is updated instead of failing to be re-created.
Other
- Unit and integration tests, and CI on Node 22 and 24.
- The published type declarations now keep their JSDoc.
Full changelog: CHANGELOG.md · PR #71