Skip to main content

Introduction

NestJS' built-in NATS transport loses messages on pod restart, doesn't retry on failure, and gives you nothing to debug with. JetStream fixes all three — but wiring it into NestJS by hand is a project on its own.

nestjs-jetstream is the swap. Same @EventPattern, same @MessagePattern, same client.emit(). Durability, retries, dead letters, and W3C tracing — underneath, automatic.

For a side-by-side with the built-in transport and the scenarios that force the switch, read Why JetStream?.

Where to start

Pick an entry point based on where you are in your journey:

The full feature catalog lives in the sidebar on the left — every page is one click away.

Runnable examples

The GitHub repository ships 9 self-contained demos covering events, RPC, ordered delivery, DLQ, health checks, scheduling, publisher-only mode, per-message TTL, and the handler metadata registry. Clone and run.