@horizon-republic/nestjs-jetstream 1.0.4
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/LICENSE.md +21 -0
- package/README.md +180 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +18 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/jetstream-client.module.d.ts +6 -0
- package/dist/client/jetstream-client.module.d.ts.map +1 -0
- package/dist/client/jetstream-client.module.js +68 -0
- package/dist/client/jetstream-client.module.js.map +1 -0
- package/dist/client/jetstream.client-proxy.d.ts +179 -0
- package/dist/client/jetstream.client-proxy.d.ts.map +1 -0
- package/dist/client/jetstream.client-proxy.js +300 -0
- package/dist/client/jetstream.client-proxy.js.map +1 -0
- package/dist/client/types/index.d.ts +7 -0
- package/dist/client/types/index.d.ts.map +1 -0
- package/dist/client/types/index.js +3 -0
- package/dist/client/types/index.js.map +1 -0
- package/dist/common/connection.provider.d.ts +309 -0
- package/dist/common/connection.provider.d.ts.map +1 -0
- package/dist/common/connection.provider.js +326 -0
- package/dist/common/connection.provider.js.map +1 -0
- package/dist/common/enum/service-type.enum.d.ts +5 -0
- package/dist/common/enum/service-type.enum.d.ts.map +1 -0
- package/dist/common/enum/service-type.enum.js +9 -0
- package/dist/common/enum/service-type.enum.js.map +1 -0
- package/dist/common/helpers.d.ts +14 -0
- package/dist/common/helpers.d.ts.map +1 -0
- package/dist/common/helpers.js +21 -0
- package/dist/common/helpers.js.map +1 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +7 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/pattern-registry.d.ts +51 -0
- package/dist/common/pattern-registry.d.ts.map +1 -0
- package/dist/common/pattern-registry.js +86 -0
- package/dist/common/pattern-registry.js.map +1 -0
- package/dist/common/rpc.context.d.ts +8 -0
- package/dist/common/rpc.context.d.ts.map +1 -0
- package/dist/common/rpc.context.js +14 -0
- package/dist/common/rpc.context.js.map +1 -0
- package/dist/common/types/index.d.ts +2 -0
- package/dist/common/types/index.d.ts.map +1 -0
- package/dist/common/types/index.js +18 -0
- package/dist/common/types/index.js.map +1 -0
- package/dist/common/types/jetstream-transport.options.d.ts +60 -0
- package/dist/common/types/jetstream-transport.options.d.ts.map +1 -0
- package/dist/common/types/jetstream-transport.options.js +3 -0
- package/dist/common/types/jetstream-transport.options.js.map +1 -0
- package/dist/enum/index.d.ts +16 -0
- package/dist/enum/index.d.ts.map +1 -0
- package/dist/enum/index.js +21 -0
- package/dist/enum/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/server/const/index.d.ts +4 -0
- package/dist/server/const/index.d.ts.map +1 -0
- package/dist/server/const/index.js +96 -0
- package/dist/server/const/index.js.map +1 -0
- package/dist/server/enum/index.d.ts +5 -0
- package/dist/server/enum/index.d.ts.map +1 -0
- package/dist/server/enum/index.js +9 -0
- package/dist/server/enum/index.js.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +19 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/jetstream-server.module.d.ts +157 -0
- package/dist/server/jetstream-server.module.d.ts.map +1 -0
- package/dist/server/jetstream-server.module.js +375 -0
- package/dist/server/jetstream-server.module.js.map +1 -0
- package/dist/server/jetstream.strategy.d.ts +150 -0
- package/dist/server/jetstream.strategy.d.ts.map +1 -0
- package/dist/server/jetstream.strategy.js +192 -0
- package/dist/server/jetstream.strategy.js.map +1 -0
- package/dist/server/jetstream.transport.d.ts +9 -0
- package/dist/server/jetstream.transport.d.ts.map +1 -0
- package/dist/server/jetstream.transport.js +26 -0
- package/dist/server/jetstream.transport.js.map +1 -0
- package/dist/server/providers/consumer.provider.d.ts +226 -0
- package/dist/server/providers/consumer.provider.d.ts.map +1 -0
- package/dist/server/providers/consumer.provider.js +272 -0
- package/dist/server/providers/consumer.provider.js.map +1 -0
- package/dist/server/providers/message-routing.provider.d.ts +295 -0
- package/dist/server/providers/message-routing.provider.d.ts.map +1 -0
- package/dist/server/providers/message-routing.provider.js +420 -0
- package/dist/server/providers/message-routing.provider.js.map +1 -0
- package/dist/server/providers/message.provider.d.ts +142 -0
- package/dist/server/providers/message.provider.d.ts.map +1 -0
- package/dist/server/providers/message.provider.js +209 -0
- package/dist/server/providers/message.provider.js.map +1 -0
- package/dist/server/providers/stream.provider.d.ts +320 -0
- package/dist/server/providers/stream.provider.d.ts.map +1 -0
- package/dist/server/providers/stream.provider.js +376 -0
- package/dist/server/providers/stream.provider.js.map +1 -0
- package/dist/server/types/index.d.ts +7 -0
- package/dist/server/types/index.d.ts.map +1 -0
- package/dist/server/types/index.js +3 -0
- package/dist/server/types/index.js.map +1 -0
- package/dist/server/types/nats.events-map.d.ts +22 -0
- package/dist/server/types/nats.events-map.d.ts.map +1 -0
- package/dist/server/types/nats.events-map.js +4 -0
- package/dist/server/types/nats.events-map.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var JetstreamServerModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.JetstreamServerModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const connection_provider_1 = require("../common/connection.provider");
|
|
13
|
+
const service_type_enum_1 = require("../common/enum/service-type.enum");
|
|
14
|
+
const helpers_1 = require("../common/helpers");
|
|
15
|
+
const pattern_registry_1 = require("../common/pattern-registry");
|
|
16
|
+
const jetstream_strategy_1 = require("./jetstream.strategy");
|
|
17
|
+
const jetstream_transport_1 = require("./jetstream.transport");
|
|
18
|
+
const consumer_provider_1 = require("./providers/consumer.provider");
|
|
19
|
+
const message_routing_provider_1 = require("./providers/message-routing.provider");
|
|
20
|
+
const message_provider_1 = require("./providers/message.provider");
|
|
21
|
+
const stream_provider_1 = require("./providers/stream.provider");
|
|
22
|
+
/**
|
|
23
|
+
* Dynamic module for configuring NATS JetStream server transport in NestJS microservices.
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
* This module provides a complete NATS JetStream consumer implementation that enables
|
|
27
|
+
* NestJS applications to receive and process messages from JetStream streams. It handles
|
|
28
|
+
* the entire lifecycle of JetStream consumers, including connection management, stream
|
|
29
|
+
* creation, message consumption, and routing to appropriate handlers.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* // Single service configuration
|
|
34
|
+
* @Module({
|
|
35
|
+
* imports: [
|
|
36
|
+
* JetstreamServerModule.forRoot({
|
|
37
|
+
* servers: ['nats://localhost:4222'],
|
|
38
|
+
* name: 'orders-service',
|
|
39
|
+
* }),
|
|
40
|
+
* ],
|
|
41
|
+
* })
|
|
42
|
+
* export class AppModule {}
|
|
43
|
+
*
|
|
44
|
+
* // Multiple services in one application
|
|
45
|
+
* @Module({
|
|
46
|
+
* imports: [
|
|
47
|
+
* JetstreamServerModule.forRoot({
|
|
48
|
+
* servers: ['nats://localhost:4222'],
|
|
49
|
+
* name: 'orders-service',
|
|
50
|
+
* }),
|
|
51
|
+
* JetstreamServerModule.forRoot({
|
|
52
|
+
* servers: ['nats://localhost:4222'],
|
|
53
|
+
* name: 'notifications-service',
|
|
54
|
+
* }),
|
|
55
|
+
* ],
|
|
56
|
+
* })
|
|
57
|
+
* export class AppModule {}
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @see {@link https://docs.nestjs.com/microservices/nats | NestJS NATS Microservices}
|
|
61
|
+
* @see {@link https://docs.nats.io/nats-concepts/jetstream | NATS JetStream Documentation}
|
|
62
|
+
*/
|
|
63
|
+
let JetstreamServerModule = JetstreamServerModule_1 = class JetstreamServerModule {
|
|
64
|
+
/**
|
|
65
|
+
* Configures the JetStream server module with the provided options.
|
|
66
|
+
*
|
|
67
|
+
* @description
|
|
68
|
+
* Creates a dynamic module with all necessary providers for JetStream message consumption.
|
|
69
|
+
* The module automatically:
|
|
70
|
+
* - Establishes a NATS connection
|
|
71
|
+
* - Creates or updates JetStream streams for events and commands
|
|
72
|
+
* - Creates durable consumers for reliable message delivery
|
|
73
|
+
* - Routes incoming messages to registered handlers
|
|
74
|
+
* - Handles reconnections and failures gracefully.
|
|
75
|
+
*
|
|
76
|
+
* Each provider is registered with a unique token based on the service name, ensuring
|
|
77
|
+
* that multiple server instances can coexist without conflicts.
|
|
78
|
+
*
|
|
79
|
+
* @param options Configuration options for the JetStream server (without serviceType).
|
|
80
|
+
* @returns A dynamic module configuration ready to be imported.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* JetstreamServerModule.forRoot({
|
|
85
|
+
* servers: ['nats://localhost:4222'],
|
|
86
|
+
* name: 'orders-service',
|
|
87
|
+
* })
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
static forRoot(options) {
|
|
91
|
+
const providers = this.createProviders(options);
|
|
92
|
+
return {
|
|
93
|
+
module: JetstreamServerModule_1,
|
|
94
|
+
providers: [
|
|
95
|
+
{
|
|
96
|
+
provide: (0, helpers_1.getJetStreamServerOptionsToken)(options.name),
|
|
97
|
+
useValue: {
|
|
98
|
+
...options,
|
|
99
|
+
name: `${options.name}__microservice`,
|
|
100
|
+
serviceType: service_type_enum_1.ServiceType.Consumer,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
...providers,
|
|
104
|
+
],
|
|
105
|
+
exports: [(0, helpers_1.getJetStreamTransportToken)(options.name)],
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Asynchronously configures the JetStream server module.
|
|
110
|
+
*
|
|
111
|
+
* @description
|
|
112
|
+
* Allows configuration to be loaded asynchronously, useful for scenarios where
|
|
113
|
+
* options need to be retrieved from configuration services, databases, or
|
|
114
|
+
* environment variables at runtime.
|
|
115
|
+
*
|
|
116
|
+
* Supports three configuration patterns:
|
|
117
|
+
* - **useFactory**: Most flexible, allows async operations and dependency injection
|
|
118
|
+
* - **useExisting**: References an existing provider in the module
|
|
119
|
+
* - **useClass**: Instantiates a class that provides the configuration.
|
|
120
|
+
*
|
|
121
|
+
* @param asyncOptions Async configuration options.
|
|
122
|
+
* @returns A dynamic module configuration with async providers.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* // Using factory with ConfigService
|
|
127
|
+
* JetstreamServerModule.forRootAsync({
|
|
128
|
+
* name: 'orders-service',
|
|
129
|
+
* imports: [ConfigModule],
|
|
130
|
+
* useFactory: (configService: ConfigService) => ({
|
|
131
|
+
* servers: configService.get<string[]>('NATS_SERVERS'),
|
|
132
|
+
* name: configService.get<string>('SERVICE_NAME'),
|
|
133
|
+
* }),
|
|
134
|
+
* inject: [ConfigService],
|
|
135
|
+
* })
|
|
136
|
+
*
|
|
137
|
+
* // Using existing provider
|
|
138
|
+
* const JETSTREAM_CONFIG = 'JETSTREAM_CONFIG';
|
|
139
|
+
*
|
|
140
|
+
* @Module({
|
|
141
|
+
* providers: [{
|
|
142
|
+
* provide: JETSTREAM_CONFIG,
|
|
143
|
+
* useValue: { servers: ['nats://localhost:4222'], name: 'my-service' },
|
|
144
|
+
* }],
|
|
145
|
+
* exports: [JETSTREAM_CONFIG],
|
|
146
|
+
* })
|
|
147
|
+
* class ConfigModule {}
|
|
148
|
+
*
|
|
149
|
+
* JetstreamServerModule.forRootAsync({
|
|
150
|
+
* name: 'orders-service',
|
|
151
|
+
* imports: [ConfigModule],
|
|
152
|
+
* useExisting: JETSTREAM_CONFIG,
|
|
153
|
+
* })
|
|
154
|
+
*
|
|
155
|
+
* // Using class
|
|
156
|
+
* @Injectable()
|
|
157
|
+
* class JetstreamConfig {
|
|
158
|
+
* servers = ['nats://localhost:4222'];
|
|
159
|
+
* name = 'my-service';
|
|
160
|
+
* }
|
|
161
|
+
*
|
|
162
|
+
* JetstreamServerModule.forRootAsync({
|
|
163
|
+
* name: 'orders-service',
|
|
164
|
+
* useClass: JetstreamConfig,
|
|
165
|
+
* })
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
static forRootAsync(asyncOptions) {
|
|
169
|
+
const asyncProviders = this.createAsyncProviders(asyncOptions);
|
|
170
|
+
const providers = this.createProviders({ name: asyncOptions.name });
|
|
171
|
+
return {
|
|
172
|
+
module: JetstreamServerModule_1,
|
|
173
|
+
imports: asyncOptions.imports ?? [],
|
|
174
|
+
providers: [...asyncProviders, ...providers],
|
|
175
|
+
exports: [(0, helpers_1.getJetStreamTransportToken)(asyncOptions.name)],
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Creates async configuration providers based on the provided options.
|
|
180
|
+
*
|
|
181
|
+
* @description
|
|
182
|
+
* Generates the appropriate provider configuration for async module setup.
|
|
183
|
+
* Handles all three async patterns: useFactory, useExisting, and useClass.
|
|
184
|
+
*
|
|
185
|
+
* @param options Async configuration options.
|
|
186
|
+
* @returns Array of providers for async configuration.
|
|
187
|
+
*/
|
|
188
|
+
static createAsyncProviders(options) {
|
|
189
|
+
if (options.useFactory) {
|
|
190
|
+
return [
|
|
191
|
+
{
|
|
192
|
+
provide: (0, helpers_1.getJetStreamServerOptionsToken)(options.name),
|
|
193
|
+
useFactory: (...args) => {
|
|
194
|
+
const result = options.useFactory(...args);
|
|
195
|
+
if (result instanceof Promise) {
|
|
196
|
+
return result.then((config) => ({
|
|
197
|
+
...config,
|
|
198
|
+
name: `${options.name}__microservice`,
|
|
199
|
+
serviceType: service_type_enum_1.ServiceType.Consumer,
|
|
200
|
+
}));
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
...result,
|
|
204
|
+
name: `${options.name}__microservice`,
|
|
205
|
+
serviceType: service_type_enum_1.ServiceType.Consumer,
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
inject: options.inject ?? [],
|
|
209
|
+
},
|
|
210
|
+
];
|
|
211
|
+
}
|
|
212
|
+
if (options.useExisting) {
|
|
213
|
+
return [
|
|
214
|
+
{
|
|
215
|
+
provide: (0, helpers_1.getJetStreamServerOptionsToken)(options.name),
|
|
216
|
+
useFactory: (config) => ({
|
|
217
|
+
...config,
|
|
218
|
+
name: `${options.name}__microservice`,
|
|
219
|
+
serviceType: service_type_enum_1.ServiceType.Consumer,
|
|
220
|
+
}),
|
|
221
|
+
inject: [options.useExisting],
|
|
222
|
+
},
|
|
223
|
+
];
|
|
224
|
+
}
|
|
225
|
+
return [
|
|
226
|
+
{
|
|
227
|
+
provide: options.useClass,
|
|
228
|
+
useClass: options.useClass,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
provide: (0, helpers_1.getJetStreamServerOptionsToken)(options.name),
|
|
232
|
+
useFactory: (config) => ({
|
|
233
|
+
...config,
|
|
234
|
+
name: `${options.name}__microservice`,
|
|
235
|
+
serviceType: service_type_enum_1.ServiceType.Consumer,
|
|
236
|
+
}),
|
|
237
|
+
inject: [options.useClass],
|
|
238
|
+
},
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Creates all required providers for the JetStream server.
|
|
243
|
+
*
|
|
244
|
+
* @description
|
|
245
|
+
* Generates the complete provider tree for a JetStream server instance.
|
|
246
|
+
* This method is shared between forRoot and forRootAsync to ensure
|
|
247
|
+
* consistent provider configuration.
|
|
248
|
+
*
|
|
249
|
+
* @param options JetStream transport options (partial for async case).
|
|
250
|
+
* @returns Array of all required providers.
|
|
251
|
+
*/
|
|
252
|
+
static createProviders(options) {
|
|
253
|
+
return [
|
|
254
|
+
// ============================================================
|
|
255
|
+
// Infrastructure Layer
|
|
256
|
+
// ============================================================
|
|
257
|
+
/**
|
|
258
|
+
* NATS connection provider.
|
|
259
|
+
* Manages the underlying NATS connection lifecycle, including
|
|
260
|
+
* connect/disconnect/reconnect events and graceful shutdown.
|
|
261
|
+
*/
|
|
262
|
+
{
|
|
263
|
+
provide: helpers_1.getToken.connection(options.name),
|
|
264
|
+
inject: [(0, helpers_1.getJetStreamServerOptionsToken)(options.name)],
|
|
265
|
+
useFactory: (options) => new connection_provider_1.ConnectionProvider(options),
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
* JetStream stream provider.
|
|
269
|
+
* Ensures that required JetStream streams exist and are properly
|
|
270
|
+
* configured for both event and command message types.
|
|
271
|
+
*/
|
|
272
|
+
{
|
|
273
|
+
provide: helpers_1.getToken.stream(options.name),
|
|
274
|
+
inject: [(0, helpers_1.getJetStreamServerOptionsToken)(options.name), helpers_1.getToken.connection(options.name)],
|
|
275
|
+
useFactory: (options, connection) => {
|
|
276
|
+
return new stream_provider_1.StreamProvider(options, connection);
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
// ============================================================
|
|
280
|
+
// Consumer Layer
|
|
281
|
+
// ============================================================
|
|
282
|
+
/**
|
|
283
|
+
* JetStream consumer provider.
|
|
284
|
+
* Creates and manages durable consumers for pulling messages
|
|
285
|
+
* from JetStream streams with acknowledgment support.
|
|
286
|
+
*/
|
|
287
|
+
{
|
|
288
|
+
provide: helpers_1.getToken.consumer(options.name),
|
|
289
|
+
inject: [
|
|
290
|
+
(0, helpers_1.getJetStreamServerOptionsToken)(options.name),
|
|
291
|
+
helpers_1.getToken.connection(options.name),
|
|
292
|
+
helpers_1.getToken.stream(options.name),
|
|
293
|
+
],
|
|
294
|
+
useFactory: (options, connection, stream) => new consumer_provider_1.ConsumerProvider(options, connection, stream),
|
|
295
|
+
},
|
|
296
|
+
// ============================================================
|
|
297
|
+
// Message Layer
|
|
298
|
+
// ============================================================
|
|
299
|
+
/**
|
|
300
|
+
* Message provider.
|
|
301
|
+
* Handles low-level message consumption from JetStream consumers,
|
|
302
|
+
* including message acknowledgment and error handling.
|
|
303
|
+
*/
|
|
304
|
+
{
|
|
305
|
+
provide: helpers_1.getToken.message(options.name),
|
|
306
|
+
inject: [helpers_1.getToken.connection(options.name), helpers_1.getToken.consumer(options.name)],
|
|
307
|
+
useFactory: (connection, consumer) => {
|
|
308
|
+
return new message_provider_1.MessageProvider(connection, consumer);
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
// ============================================================
|
|
312
|
+
// Application Layer
|
|
313
|
+
// ============================================================
|
|
314
|
+
/**
|
|
315
|
+
* Pattern registry.
|
|
316
|
+
* Maps NATS subjects to NestJS message handlers registered via.
|
|
317
|
+
*/
|
|
318
|
+
{
|
|
319
|
+
provide: helpers_1.getToken.patternRegistry(options.name),
|
|
320
|
+
inject: [(0, helpers_1.getJetStreamServerOptionsToken)(options.name), helpers_1.getToken.strategy(options.name)],
|
|
321
|
+
useFactory: (options, strategy) => {
|
|
322
|
+
return new pattern_registry_1.PatternRegistry(options, strategy);
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* Message routing provider.
|
|
327
|
+
* Routes incoming messages to appropriate handlers based on
|
|
328
|
+
* subject patterns and handles response serialization.
|
|
329
|
+
*/
|
|
330
|
+
{
|
|
331
|
+
provide: helpers_1.getToken.messageRouting(options.name),
|
|
332
|
+
inject: [
|
|
333
|
+
helpers_1.getToken.connection(options.name),
|
|
334
|
+
helpers_1.getToken.message(options.name),
|
|
335
|
+
helpers_1.getToken.patternRegistry(options.name),
|
|
336
|
+
],
|
|
337
|
+
useFactory: (connection, message, patternRegistry) => new message_routing_provider_1.MessageRoutingProvider(connection, message, patternRegistry),
|
|
338
|
+
},
|
|
339
|
+
// ============================================================
|
|
340
|
+
// Transport Layer
|
|
341
|
+
// ============================================================
|
|
342
|
+
/**
|
|
343
|
+
* JetStream transport strategy.
|
|
344
|
+
* Coordinates all providers to implement the NestJS CustomTransportStrategy
|
|
345
|
+
* interface and manage the complete message processing lifecycle.
|
|
346
|
+
*/
|
|
347
|
+
{
|
|
348
|
+
provide: helpers_1.getToken.strategy(options.name),
|
|
349
|
+
inject: [
|
|
350
|
+
helpers_1.getToken.connection(options.name),
|
|
351
|
+
helpers_1.getToken.stream(options.name),
|
|
352
|
+
helpers_1.getToken.consumer(options.name),
|
|
353
|
+
],
|
|
354
|
+
useFactory: (connection, stream, consumer) => new jetstream_strategy_1.JetstreamStrategy(connection, stream, consumer),
|
|
355
|
+
},
|
|
356
|
+
/**
|
|
357
|
+
* JetStream transport wrapper.
|
|
358
|
+
* Main entry point that combines options and strategy into
|
|
359
|
+
* a CustomStrategy implementation for NestJS microservices.
|
|
360
|
+
*/
|
|
361
|
+
{
|
|
362
|
+
provide: (0, helpers_1.getJetStreamTransportToken)(options.name),
|
|
363
|
+
inject: [(0, helpers_1.getJetStreamServerOptionsToken)(options.name), helpers_1.getToken.strategy(options.name)],
|
|
364
|
+
useFactory: (options, strategy) => {
|
|
365
|
+
return new jetstream_transport_1.JetstreamTransport(options, strategy);
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
];
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
exports.JetstreamServerModule = JetstreamServerModule;
|
|
372
|
+
exports.JetstreamServerModule = JetstreamServerModule = JetstreamServerModule_1 = __decorate([
|
|
373
|
+
(0, common_1.Module)({})
|
|
374
|
+
], JetstreamServerModule);
|
|
375
|
+
//# sourceMappingURL=jetstream-server.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jetstream-server.module.js","sourceRoot":"","sources":["../../src/server/jetstream-server.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAkF;AAElF,uEAAmE;AACnE,wEAA+D;AAC/D,+CAI2B;AAC3B,iEAA6D;AAG7D,6DAAyD;AACzD,+DAA2D;AAC3D,qEAAiE;AACjE,mFAA8E;AAC9E,mEAA+D;AAC/D,iEAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEI,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAChC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,MAAM,CAAC,OAAO,CAAC,OAAwD;QAC5E,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAEhD,OAAO;YACL,MAAM,EAAE,uBAAqB;YAC7B,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,IAAA,wCAA8B,EAAC,OAAO,CAAC,IAAI,CAAC;oBACrD,QAAQ,EAAE;wBACR,GAAG,OAAO;wBACV,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,gBAAgB;wBACrC,WAAW,EAAE,+BAAW,CAAC,QAAQ;qBAClC;iBAC6C;gBAChD,GAAG,SAAS;aACb;YACD,OAAO,EAAE,CAAC,IAAA,oCAA0B,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SACpD,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACI,MAAM,CAAC,YAAY,CAAC,YAA0C;QACnE,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC;QAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAG/D,CAAC,CAAC;QAEH,OAAO;YACL,MAAM,EAAE,uBAAqB;YA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C,OAAO,CAAC,IAAI,CAAC,CAAC;gBACvF,UAAU,EAAE,CACV,OAAmC,EACnC,QAA2B,EACP,EAAE;oBACtB,OAAO,IAAI,wCAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;gBACnD,CAAC;aAC4C;SAChD,CAAC;IACJ,CAAC;CACF,CAAA;AA7WY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,qBAAqB,CA6WjC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { CustomTransportStrategy, Server, TransportId } from '@nestjs/microservices';
|
|
3
|
+
import { NatsConnection } from 'nats';
|
|
4
|
+
import { ConnectionProvider } from '../common/connection.provider';
|
|
5
|
+
import { ConsumerProvider } from './providers/consumer.provider';
|
|
6
|
+
import { StreamProvider } from './providers/stream.provider';
|
|
7
|
+
import { INatsEventsMap } from './types/nats.events-map';
|
|
8
|
+
/**
|
|
9
|
+
* Custom transport strategy for NATS JetStream integration with NestJS microservices.
|
|
10
|
+
*
|
|
11
|
+
* @description
|
|
12
|
+
* This class implements a custom transport strategy that enables NestJS microservices
|
|
13
|
+
* to communicate via NATS JetStream. It handles the complete lifecycle of the transport,
|
|
14
|
+
* including connection management, stream creation, consumer setup, and automatic reconnection.
|
|
15
|
+
*
|
|
16
|
+
* The strategy extends the NestJS `Server` class and implements both `CustomTransportStrategy`
|
|
17
|
+
* and `OnModuleInit` interfaces to integrate seamlessly with the NestJS lifecycle.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Key features:
|
|
21
|
+
* - Automatic reconnection handling on connection loss
|
|
22
|
+
* - Stream and consumer lifecycle management
|
|
23
|
+
* - Event-driven architecture using RxJS
|
|
24
|
+
* - Graceful shutdown support
|
|
25
|
+
* - Type-safe event handling via NATS events map
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
* @see {@link https://docs.nestjs.com/microservices/custom-transport | NestJS Custom Transport}
|
|
29
|
+
* @see {@link https://docs.nats.io/nats-concepts/jetstream | NATS JetStream Documentation}
|
|
30
|
+
*/
|
|
31
|
+
export declare class JetstreamStrategy extends Server<INatsEventsMap> implements CustomTransportStrategy, OnModuleInit {
|
|
32
|
+
private readonly connectionProvider;
|
|
33
|
+
private readonly streamProvider;
|
|
34
|
+
private readonly consumerProvider;
|
|
35
|
+
/**
|
|
36
|
+
* Unique identifier for this transport strategy.
|
|
37
|
+
*
|
|
38
|
+
* @description
|
|
39
|
+
* A symbol that uniquely identifies this transport within the NestJS microservices ecosystem.
|
|
40
|
+
* This ensures that the transport can be distinguished from other custom transports.
|
|
41
|
+
*/
|
|
42
|
+
readonly transportId: TransportId;
|
|
43
|
+
/**
|
|
44
|
+
* Subject for managing component lifecycle and cleanup.
|
|
45
|
+
*
|
|
46
|
+
* @description
|
|
47
|
+
* Emits when the transport is being destroyed, signaling all active subscriptions
|
|
48
|
+
* to complete and clean up their resources.
|
|
49
|
+
*/
|
|
50
|
+
private readonly destroy$;
|
|
51
|
+
/**
|
|
52
|
+
* Subject for triggering reconnection logic.
|
|
53
|
+
*
|
|
54
|
+
* @description
|
|
55
|
+
* Emits when the NATS connection is re-established, triggering the recreation
|
|
56
|
+
* of streams and consumers to resume normal operation.
|
|
57
|
+
*/
|
|
58
|
+
private readonly reconnect$;
|
|
59
|
+
/**
|
|
60
|
+
* Creates an instance of JetstreamStrategy.
|
|
61
|
+
*
|
|
62
|
+
* @param connectionProvider Provider that manages the NATS connection lifecycle and status.
|
|
63
|
+
* @param streamProvider Provider responsible for creating and managing JetStream streams.
|
|
64
|
+
* @param consumerProvider Provider responsible for creating and managing JetStream consumers.
|
|
65
|
+
*/
|
|
66
|
+
constructor(connectionProvider: ConnectionProvider, streamProvider: StreamProvider, consumerProvider: ConsumerProvider);
|
|
67
|
+
/**
|
|
68
|
+
* Lifecycle hook that runs after module initialization.
|
|
69
|
+
*
|
|
70
|
+
* @description
|
|
71
|
+
* Sets up automatic reconnection handling by listening to NATS reconnect events.
|
|
72
|
+
* When a reconnection occurs, it triggers the `reconnect$` subject to reinitialize
|
|
73
|
+
* streams and consumers.
|
|
74
|
+
*
|
|
75
|
+
* This ensures that the transport can automatically recover from connection failures
|
|
76
|
+
* without manual intervention.
|
|
77
|
+
*/
|
|
78
|
+
onModuleInit(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Starts listening for messages on the JetStream transport.
|
|
81
|
+
*
|
|
82
|
+
* @description
|
|
83
|
+
* Initializes the transport by:
|
|
84
|
+
* 1. Setting up a reactive pipeline that responds to reconnection events
|
|
85
|
+
* 2. Creating necessary JetStream streams via `StreamProvider`
|
|
86
|
+
* 3. Creating JetStream consumers via `ConsumerProvider`
|
|
87
|
+
* 4. Invoking the callback when setup is complete.
|
|
88
|
+
*
|
|
89
|
+
* The pipeline automatically handles reconnections by recreating streams and consumers
|
|
90
|
+
* when the `reconnect$` subject emits. The `startWith` operator ensures the pipeline
|
|
91
|
+
* runs immediately on first subscription.
|
|
92
|
+
*
|
|
93
|
+
* @param done Callback function invoked after successful initialization or reconnection.
|
|
94
|
+
*/
|
|
95
|
+
listen(done: () => void): void;
|
|
96
|
+
/**
|
|
97
|
+
* Closes the transport and cleans up all resources.
|
|
98
|
+
*
|
|
99
|
+
* @description
|
|
100
|
+
* Performs graceful shutdown by:
|
|
101
|
+
* 1. Emitting to `destroy$` to complete all active subscriptions
|
|
102
|
+
* 2. Completing the destroy subject itself
|
|
103
|
+
* 3. Initiating graceful shutdown of the NATS connection.
|
|
104
|
+
*
|
|
105
|
+
* This ensures that all messages are processed and acknowledged before
|
|
106
|
+
* the connection is terminated.
|
|
107
|
+
*/
|
|
108
|
+
close(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Registers an event listener for NATS connection events.
|
|
111
|
+
*
|
|
112
|
+
* @description
|
|
113
|
+
* Sets up a type-safe event listener that subscribes to connection status changes
|
|
114
|
+
* from the `ConnectionProvider`. When an event matching the specified type occurs,
|
|
115
|
+
* the callback is invoked with the event data.
|
|
116
|
+
*
|
|
117
|
+
* The subscription is automatically cleaned up when the transport is destroyed.
|
|
118
|
+
*
|
|
119
|
+
* @template EventKey - Type of event key from the NATS events map.
|
|
120
|
+
* @param event The NATS event to listen for (e.g., `Events.Reconnect`, `Events.Disconnect`).
|
|
121
|
+
* @param callback Callback function invoked when the event occurs, receives event data as argument.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* strategy.on(Events.Disconnect, () => {
|
|
126
|
+
* console.log('Connection lost');
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
on<EventKey extends keyof INatsEventsMap>(event: EventKey, callback: INatsEventsMap[EventKey]): void;
|
|
131
|
+
/**
|
|
132
|
+
* Retrieves the underlying NATS connection instance.
|
|
133
|
+
*
|
|
134
|
+
* @description
|
|
135
|
+
* Provides direct access to the raw NATS connection for advanced use cases
|
|
136
|
+
* where low-level NATS API access is required. This is useful for custom
|
|
137
|
+
* operations not covered by the transport abstraction.
|
|
138
|
+
*
|
|
139
|
+
* @template T - Type to cast the connection to, defaults to `NatsConnection`.
|
|
140
|
+
* @returns The unwrapped NATS connection instance.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const connection = strategy.unwrap<NatsConnection>();
|
|
145
|
+
* const jsm = await connection.jetstreamManager();
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
unwrap<T = NatsConnection>(): T;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=jetstream.strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jetstream.strategy.d.ts","sourceRoot":"","sources":["../../src/server/jetstream.strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,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