@cargolift-cdi/util-rabbitmq 0.1.4 → 0.1.6

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/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /**
18
+ * Public export surface for shared types.
19
+ * Keep exports stable to avoid breaking downstream projects.
20
+ */
21
+ __exportStar(require("./rabbitmq-publisher.service"), exports);
22
+ __exportStar(require("./rabbitmq-publisher.module"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,+DAA6C;AAC7C,8DAA4C"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
+ var _, done = false;
8
+ for (var i = decorators.length - 1; i >= 0; i--) {
9
+ var context = {};
10
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
+ if (kind === "accessor") {
15
+ if (result === void 0) continue;
16
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
+ if (_ = accept(result.get)) descriptor.get = _;
18
+ if (_ = accept(result.set)) descriptor.set = _;
19
+ if (_ = accept(result.init)) initializers.unshift(_);
20
+ }
21
+ else if (_ = accept(result)) {
22
+ if (kind === "field") initializers.unshift(_);
23
+ else descriptor[key] = _;
24
+ }
25
+ }
26
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
+ done = true;
28
+ };
29
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
+ var useValue = arguments.length > 2;
31
+ for (var i = 0; i < initializers.length; i++) {
32
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
+ }
34
+ return useValue ? value : void 0;
35
+ };
36
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
37
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
38
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.RabbitMQPublisherModule = void 0;
42
+ const common_1 = require("@nestjs/common");
43
+ const rabbitmq_publisher_service_1 = require("./rabbitmq-publisher.service");
44
+ let RabbitMQPublisherModule = (() => {
45
+ let _classDecorators = [(0, common_1.Module)({
46
+ providers: [rabbitmq_publisher_service_1.RabbitMQPublisherService],
47
+ exports: [rabbitmq_publisher_service_1.RabbitMQPublisherService],
48
+ })];
49
+ let _classDescriptor;
50
+ let _classExtraInitializers = [];
51
+ let _classThis;
52
+ var RabbitMQPublisherModule = _classThis = class {
53
+ };
54
+ __setFunctionName(_classThis, "RabbitMQPublisherModule");
55
+ (() => {
56
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
57
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
58
+ RabbitMQPublisherModule = _classThis = _classDescriptor.value;
59
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
60
+ __runInitializers(_classThis, _classExtraInitializers);
61
+ })();
62
+ return RabbitMQPublisherModule = _classThis;
63
+ })();
64
+ exports.RabbitMQPublisherModule = RabbitMQPublisherModule;
65
+ //# sourceMappingURL=rabbitmq-publisher.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rabbitmq-publisher.module.js","sourceRoot":"","sources":["../src/rabbitmq-publisher.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6EAAwE;IAO3D,uBAAuB;4BAJnC,IAAA,eAAM,EAAC;YACN,SAAS,EAAE,CAAC,qDAAwB,CAAC;YACrC,OAAO,EAAE,CAAC,qDAAwB,CAAC;SACpC,CAAC;;;;;;;;;QACF,6KAAuC;;;QAA1B,uDAAuB;;;;AAAvB,0DAAuB"}
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
19
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
20
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
21
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
22
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
23
+ var _, done = false;
24
+ for (var i = decorators.length - 1; i >= 0; i--) {
25
+ var context = {};
26
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
27
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
28
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
29
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
30
+ if (kind === "accessor") {
31
+ if (result === void 0) continue;
32
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
33
+ if (_ = accept(result.get)) descriptor.get = _;
34
+ if (_ = accept(result.set)) descriptor.set = _;
35
+ if (_ = accept(result.init)) initializers.unshift(_);
36
+ }
37
+ else if (_ = accept(result)) {
38
+ if (kind === "field") initializers.unshift(_);
39
+ else descriptor[key] = _;
40
+ }
41
+ }
42
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
43
+ done = true;
44
+ };
45
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
46
+ var useValue = arguments.length > 2;
47
+ for (var i = 0; i < initializers.length; i++) {
48
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
49
+ }
50
+ return useValue ? value : void 0;
51
+ };
52
+ var __importStar = (this && this.__importStar) || (function () {
53
+ var ownKeys = function(o) {
54
+ ownKeys = Object.getOwnPropertyNames || function (o) {
55
+ var ar = [];
56
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
57
+ return ar;
58
+ };
59
+ return ownKeys(o);
60
+ };
61
+ return function (mod) {
62
+ if (mod && mod.__esModule) return mod;
63
+ var result = {};
64
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
65
+ __setModuleDefault(result, mod);
66
+ return result;
67
+ };
68
+ })();
69
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
70
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
71
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
72
+ };
73
+ Object.defineProperty(exports, "__esModule", { value: true });
74
+ exports.RabbitMQPublisherService = void 0;
75
+ const common_1 = require("@nestjs/common");
76
+ const amqp = __importStar(require("amqplib"));
77
+ let RabbitMQPublisherService = (() => {
78
+ let _classDecorators = [(0, common_1.Injectable)({ scope: common_1.Scope.REQUEST })];
79
+ let _classDescriptor;
80
+ let _classExtraInitializers = [];
81
+ let _classThis;
82
+ var RabbitMQPublisherService = _classThis = class {
83
+ constructor(logger) {
84
+ this.logger = logger;
85
+ }
86
+ /**
87
+ * Emite mensagem diretamente com amqplib para garantir que headers virem nas Properties.
88
+ * - pattern: nome da fila/routingKey (ex: 'notifications')
89
+ * - payload: corpo da mensagem
90
+ * - client: ClientProxy (mantido para compatibilidade, mas não usado para publicar)
91
+ * - opts: opções opcionais: { exchange, exchangeType, routingKey, headers }
92
+ */
93
+ async emit(pattern, payload, client, opts) {
94
+ const ctx = this.logger.getContext();
95
+ const headers = { ...(opts?.headers || {}) };
96
+ if (ctx?.correlation_id)
97
+ headers['x-correlation-id'] = ctx.correlation_id;
98
+ if (ctx?.trace)
99
+ headers['x-trace'] = ctx.trace;
100
+ headers['pattern'] = pattern;
101
+ const messageBody = { pattern, data: payload };
102
+ // URL do RabbitMQ (use a mesma que está no ClientsModule)
103
+ const url = process.env.RABBITMQ_URL;
104
+ if (!url)
105
+ throw new Error('RABBITMQ_URL não definido');
106
+ const connection = await amqp.connect(url);
107
+ // Evita crash por "Unhandled 'error' event" e garante log com contexto atual
108
+ connection.on('error', (err) => {
109
+ try {
110
+ this.logger?.error('AMQP connection error', err, { context: { rabbitmq: { url, queue: pattern } } });
111
+ }
112
+ catch { }
113
+ });
114
+ connection.on('close', () => {
115
+ /* intentionally left blank */
116
+ });
117
+ let channel = null;
118
+ try {
119
+ channel = await connection.createChannel();
120
+ channel.on('error', (err) => {
121
+ /* intentionally left blank */
122
+ });
123
+ channel.on('close', () => {
124
+ /* intentionally left blank */
125
+ });
126
+ // Alinhar arguments da fila com o que já foi criado (ex.: x-dead-letter-exchange)
127
+ const queueArgs = {};
128
+ if (process.env.RABBITMQ_DLX) {
129
+ queueArgs['x-dead-letter-exchange'] = process.env.RABBITMQ_DLX;
130
+ }
131
+ // Declare a fila com os mesmos argumentos (se houver) para evitar PRECONDITION_FAILED
132
+ const queueOptions = Object.keys(queueArgs).length
133
+ ? { durable: true, arguments: queueArgs }
134
+ : { durable: true };
135
+ const content = Buffer.from(JSON.stringify(messageBody));
136
+ // Prioridade: opts.exchange > variável de ambiente RABBITMQ_EXCHANGE > enviar direto para fila
137
+ const exchangeToUse = opts?.exchange ?? process.env.RABBITMQ_EXCHANGE;
138
+ const exchangeType = opts?.exchangeType ?? process.env.RABBITMQ_EXCHANGE_TYPE ?? 'direct';
139
+ const routingKey = opts?.routingKey ?? pattern;
140
+ if (exchangeToUse) {
141
+ await channel.assertExchange(exchangeToUse, exchangeType, { durable: true });
142
+ const published = channel.publish(exchangeToUse, routingKey, content, {
143
+ persistent: true,
144
+ headers,
145
+ });
146
+ if (!published) {
147
+ // backpressure: aguardar 'drain' se necessário (simplificado)
148
+ await new Promise((res) => channel.once('drain', () => res()));
149
+ }
150
+ this.logger.info(`Mensagem publicada no exchange "${exchangeToUse}" com routingKey "${routingKey}"`, {
151
+ context: { rabbitmq: { exchange: exchangeToUse, routingKey } },
152
+ });
153
+ }
154
+ else {
155
+ // certifica que a fila existe antes de enviar diretamente
156
+ /*
157
+ await channel.assertQueue(pattern, queueOptions);
158
+ channel.sendToQueue(pattern, content, {
159
+ persistent: true,
160
+ headers,
161
+ });
162
+ */
163
+ channel.sendToQueue(pattern, content, {
164
+ persistent: true,
165
+ headers,
166
+ });
167
+ this.logger.info(`Mensagem publicada na fila do RabbitMQ "${pattern}"`, {
168
+ context: { rabbitmq: { queue: pattern } },
169
+ });
170
+ }
171
+ await channel.close();
172
+ }
173
+ catch (err) {
174
+ // Loga com contexto e relança para que o controller/filtro capture
175
+ this.logger.error(`Erro ao publicar mensagem no RabbitMQ "${pattern}"`, err, {
176
+ context: { rabbitmq: { queue: pattern } },
177
+ });
178
+ throw err;
179
+ }
180
+ finally {
181
+ try {
182
+ if (channel) {
183
+ try {
184
+ await channel.close();
185
+ }
186
+ catch { }
187
+ }
188
+ }
189
+ catch { }
190
+ try {
191
+ await connection.close();
192
+ }
193
+ catch {
194
+ // ignora erros ao fechar conexão
195
+ }
196
+ }
197
+ }
198
+ };
199
+ __setFunctionName(_classThis, "RabbitMQPublisherService");
200
+ (() => {
201
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
202
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
203
+ RabbitMQPublisherService = _classThis = _classDescriptor.value;
204
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
205
+ __runInitializers(_classThis, _classExtraInitializers);
206
+ })();
207
+ return RabbitMQPublisherService = _classThis;
208
+ })();
209
+ exports.RabbitMQPublisherService = RabbitMQPublisherService;
210
+ //# sourceMappingURL=rabbitmq-publisher.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rabbitmq-publisher.service.js","sourceRoot":"","sources":["../src/rabbitmq-publisher.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAmD;AAEnD,8CAAgC;IAKnB,wBAAwB;4BADpC,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;;;;;QAEnC,YAA6B,MAA4B;YAA5B,WAAM,GAAN,MAAM,CAAsB;QAAI,CAAC;QAE9D;;;;;;WAMG;QACH,KAAK,CAAC,IAAI,CACR,OAAe,EACf,OAAY,EACZ,MAAoB,EACpB,IAKC;YAED,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;YACrC,MAAM,OAAO,GAAwB,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;YAElE,IAAI,GAAG,EAAE,cAAc;gBAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC;YAC1E,IAAI,GAAG,EAAE,KAAK;gBAAE,OAAO,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC;YAE/C,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;YAC7B,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAE/C,0DAA0D;YAC1D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;YACrC,IAAI,CAAC,GAAG;gBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAEvD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,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2CAA2C,OAAO,GAAG,EAAE;wBACtE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;qBAC1C,CAAC,CAAC;gBACL,CAAC;gBAED,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;YACxB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,mEAAmE;gBACnE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,GAAG,EAAE,GAAU,EAAE;oBAClF,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;iBAC1C,CAAC,CAAC;gBACH,MAAM,GAAG,CAAC;YACZ,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC;oBACH,IAAI,OAAO,EAAE,CAAC;wBACZ,IAAI,CAAC;4BACH,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;wBACxB,CAAC;wBAAC,MAAM,CAAC,CAAC,CAAC;oBACb,CAAC;gBACH,CAAC;gBAAC,MAAM,CAAC,CAAC,CAAC;gBACX,IAAI,CAAC;oBACH,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;gBAC3B,CAAC;gBAAC,MAAM,CAAC;oBACP,iCAAiC;gBACnC,CAAC;YACH,CAAC;QACH,CAAC;;;;;QAhIH,6KAiIC;;;QAjIY,uDAAwB;;;;AAAxB,4DAAwB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargolift-cdi/util-rabbitmq",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Funções utilitárias para trabalhar com RabbitMQ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "files": [
29
- "dist/**/*",
29
+ "dist",
30
30
  "README.md",
31
31
  "LICENSE"
32
32
  ],