Skip to content

nestjs-nats-jetstream-transport 2.4.0

Latest

Choose a tag to compare

@kenguru33 kenguru33 released this 18 Nov 22:48
· 1 commit to master since this release

@nestjs-plugins/nestjs-nats-jetstream-transport@2.4.0. It adds NestJS 11 support, and the same build keeps working on NestJS 8. Existing code needs no changes.

npm i @nestjs-plugins/nestjs-nats-jetstream-transport@^2.4.0

Features

  • Supports NestJS 8, 9, 10 and 11. @nestjs/common and @nestjs/microservices are now peer dependencies (^8 || ^9 || ^10 || ^11). CI tests NestJS 8 and 11 on Node 22 and 24.
  • NestJS 11 transport members on NatsJetStreamServer and NatsJetStreamClientProxy, matching NestJS's own NATS transport. They also work on NestJS 8.
    • status: an Observable of connected, disconnected or reconnecting
    • on('disconnect' | 'reconnect' | 'update', callback): NATS connection events
    • unwrap(): the underlying NatsConnection
    • The names are exported as NatsJetStreamStatus and NatsJetStreamEvents.

Unchanged

  • listen() still does not call back or reject when NATS cannot be reached.
  • Failed event handlers keep the same default behavior, and eventHandlerError works as before.
  • Stream setup, durable consumer naming and client connection reuse are unchanged.

Requires Node.js 22 or later, as 2.3.x does. See the README section "Connection status, events and the NATS connection" for usage. PR #73.