@horizon-republic/nestjs-jetstream 2.8.0 → 2.9.1

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 CHANGED
@@ -11,7 +11,7 @@ Events, broadcast, ordered delivery, and RPC — with two lines of config.
11
11
  [![Documentation](https://img.shields.io/badge/docs-online-brightgreen.svg)](https://horizonrepublic.github.io/nestjs-jetstream/)
12
12
 
13
13
  [![Node.js](https://img.shields.io/node/v/@horizon-republic/nestjs-jetstream.svg)](https://nodejs.org)
14
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org)
14
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7%2B-blue.svg)](https://www.typescriptlang.org)
15
15
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
16
16
 
17
17
  </div>
@@ -28,7 +28,7 @@ You keep writing `@EventPattern()` and `@MessagePattern()`. The library handles
28
28
 
29
29
  **Delivery modes** — workqueue (one consumer), broadcast (all consumers), ordered (sequential), and dual-mode RPC (Core or JetStream-backed).
30
30
 
31
- **Production-ready** — dead letter queue, health checks, graceful shutdown with drain, lifecycle hooks for observability.
31
+ **Operations** — dead letter queue stream, health indicator for Kubernetes probes, graceful shutdown with drain, lifecycle hooks for observability.
32
32
 
33
33
  **Flexible** — pluggable codecs (JSON/MsgPack/Protobuf), per-stream configuration, publisher-only mode for API gateways.
34
34
 
@@ -63,6 +63,19 @@ export class OrdersController {
63
63
  return this.client.emit('order.created', { orderId: 42 });
64
64
  }
65
65
  }
66
+
67
+ // main.ts — wire the JetStream microservice transport into the HTTP app
68
+ async function bootstrap() {
69
+ const app = await NestFactory.create(AppModule);
70
+ app.connectMicroservice(
71
+ { strategy: app.get(JetstreamStrategy) },
72
+ { inheritAppConfig: true },
73
+ );
74
+ app.enableShutdownHooks();
75
+ await app.startAllMicroservices();
76
+ await app.listen(3000);
77
+ }
78
+ void bootstrap();
66
79
  ```
67
80
 
68
81
  ## Documentation