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:
- New to the library? — Installation → Quick Start
- Comparing transports? — Why JetStream? covers when Core NATS is enough and when you outgrow it
- Migrating from
@nestjs/microservicesNATS? — Migration Guide - Planning a production rollout? — Module Configuration, Dead Letter Queue, Graceful Shutdown, Health Checks, Performance Tuning
- Looking for a specific delivery pattern? — Workqueue Events, RPC (Request/Reply), Broadcast, Ordered Events
The full feature catalog lives in the sidebar on the left — every page is one click away.
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.