@horizon-republic/nestjs-jetstream 2.5.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -5
- package/dist/index.cjs +620 -307
- package/dist/index.d.cts +239 -62
- package/dist/index.d.ts +239 -62
- package/dist/index.js +621 -317
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,11 +1,36 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @horizon-republic/nestjs-jetstream
|
|
2
4
|
|
|
3
|
-
Ship reliable microservices with NATS JetStream and NestJS
|
|
5
|
+
**Ship reliable microservices with NATS JetStream and NestJS.**
|
|
6
|
+
Events, broadcast, ordered delivery, and RPC — with two lines of config.
|
|
4
7
|
|
|
5
8
|
[](https://www.npmjs.com/package/@horizon-republic/nestjs-jetstream)
|
|
6
9
|
[](https://codecov.io/github/HorizonRepublic/nestjs-jetstream)
|
|
10
|
+
[](https://github.com/HorizonRepublic/nestjs-jetstream/actions)
|
|
11
|
+
[](https://horizonrepublic.github.io/nestjs-jetstream/)
|
|
12
|
+
|
|
13
|
+
[](https://nodejs.org)
|
|
14
|
+
[](https://www.typescriptlang.org)
|
|
7
15
|
[](https://opensource.org/licenses/MIT)
|
|
8
|
-
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Why this library?
|
|
22
|
+
|
|
23
|
+
NestJS ships with a NATS transport, but it's fire-and-forget. Messages vanish if no one's listening. This library adds JetStream — so your messages **survive restarts**, **retry on failure**, and **replay for new consumers**.
|
|
24
|
+
|
|
25
|
+
You keep writing `@EventPattern()` and `@MessagePattern()`. The library handles streams, consumers, and subjects automatically.
|
|
26
|
+
|
|
27
|
+
## What's inside
|
|
28
|
+
|
|
29
|
+
**Delivery modes** — workqueue (one consumer), broadcast (all consumers), ordered (sequential), and dual-mode RPC (Core or JetStream-backed).
|
|
30
|
+
|
|
31
|
+
**Production-ready** — dead letter queue, health checks, graceful shutdown with drain, lifecycle hooks for observability.
|
|
32
|
+
|
|
33
|
+
**Flexible** — pluggable codecs (JSON/MsgPack/Protobuf), per-stream configuration, publisher-only mode for API gateways.
|
|
9
34
|
|
|
10
35
|
## Quick Start
|
|
11
36
|
|
|
@@ -44,9 +69,13 @@ export class OrdersController {
|
|
|
44
69
|
|
|
45
70
|
**[Read the full documentation →](https://horizonrepublic.github.io/nestjs-jetstream/)**
|
|
46
71
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
72
|
+
| Section | What you'll learn |
|
|
73
|
+
|---------|-------------------|
|
|
74
|
+
| [Getting Started](https://horizonrepublic.github.io/nestjs-jetstream/docs/getting-started/installation) | Installation, module setup, first handler |
|
|
75
|
+
| [Messaging Patterns](https://horizonrepublic.github.io/nestjs-jetstream/docs/patterns/rpc) | RPC, Events, Broadcast, Ordered Events |
|
|
76
|
+
| [Guides](https://horizonrepublic.github.io/nestjs-jetstream/docs/guides/record-builder) | Handler context, DLQ, health checks, performance tuning |
|
|
77
|
+
| [Migration](https://horizonrepublic.github.io/nestjs-jetstream/docs/guides/migration) | From built-in NATS transport or between versions |
|
|
78
|
+
| [API Reference](https://horizonrepublic.github.io/nestjs-jetstream/docs/reference/api/) | Full TypeDoc-generated API |
|
|
50
79
|
|
|
51
80
|
## Links
|
|
52
81
|
|