@droidsolutions-oss/amqp-ts 2.5.0 → 2.6.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.
Files changed (60) hide show
  1. package/README.md +23 -16
  2. package/lib/AmqpProperties.d.ts +81 -0
  3. package/lib/AmqpProperties.js +3 -0
  4. package/lib/AmqpProperties.js.map +1 -0
  5. package/lib/Binding.d.ts +18 -0
  6. package/lib/Binding.js +112 -0
  7. package/lib/Binding.js.map +1 -0
  8. package/lib/Connection/Connection.d.ts +109 -0
  9. package/lib/Connection/Connection.js +346 -0
  10. package/lib/Connection/Connection.js.map +1 -0
  11. package/lib/Connection/ConnectionMetrics.d.ts +7 -0
  12. package/lib/Connection/ConnectionMetrics.js +3 -0
  13. package/lib/Connection/ConnectionMetrics.js.map +1 -0
  14. package/lib/Connection/ReconnectStrategy.d.ts +4 -0
  15. package/lib/Connection/ReconnectStrategy.js +3 -0
  16. package/lib/Connection/ReconnectStrategy.js.map +1 -0
  17. package/lib/Connection/Topology.d.ts +19 -0
  18. package/lib/Connection/Topology.js +3 -0
  19. package/lib/Connection/Topology.js.map +1 -0
  20. package/lib/Exchange/DeclarationOptions.d.ts +20 -0
  21. package/lib/Exchange/DeclarationOptions.js +3 -0
  22. package/lib/Exchange/DeclarationOptions.js.map +1 -0
  23. package/lib/Exchange/Exchange.d.ts +94 -0
  24. package/lib/Exchange/Exchange.js +279 -0
  25. package/lib/Exchange/Exchange.js.map +1 -0
  26. package/lib/Exchange/ExchangeType.d.ts +6 -0
  27. package/lib/Exchange/ExchangeType.js +3 -0
  28. package/lib/Exchange/ExchangeType.js.map +1 -0
  29. package/lib/Exchange/InitializeResult.d.ts +3 -0
  30. package/lib/Exchange/InitializeResult.js +3 -0
  31. package/lib/Exchange/InitializeResult.js.map +1 -0
  32. package/lib/LoggerFactory.d.ts +48 -0
  33. package/lib/LoggerFactory.js +13 -0
  34. package/lib/LoggerFactory.js.map +1 -0
  35. package/lib/Message.d.ts +52 -0
  36. package/lib/Message.js +125 -0
  37. package/lib/Message.js.map +1 -0
  38. package/lib/Queue/DeclarationOptions.d.ts +18 -0
  39. package/lib/Queue/DeclarationOptions.js +3 -0
  40. package/lib/Queue/DeclarationOptions.js.map +1 -0
  41. package/lib/Queue/DeleteResult.d.ts +3 -0
  42. package/lib/Queue/DeleteResult.js +3 -0
  43. package/lib/Queue/DeleteResult.js.map +1 -0
  44. package/lib/Queue/InitializeResult.d.ts +5 -0
  45. package/lib/Queue/InitializeResult.js +3 -0
  46. package/lib/Queue/InitializeResult.js.map +1 -0
  47. package/lib/Queue/Queue.d.ts +107 -0
  48. package/lib/Queue/Queue.js +339 -0
  49. package/lib/Queue/Queue.js.map +1 -0
  50. package/lib/Queue/StartConsumerResult.d.ts +5 -0
  51. package/lib/Queue/StartConsumerResult.js +3 -0
  52. package/lib/Queue/StartConsumerResult.js.map +1 -0
  53. package/lib/amqp-ts.d.ts +9 -0
  54. package/lib/amqp-ts.js +21 -0
  55. package/lib/amqp-ts.js.map +1 -0
  56. package/lib/index.d.ts +14 -0
  57. package/lib/index.js +14 -0
  58. package/lib/index.js.map +1 -0
  59. package/package.json +36 -28
  60. package/CHANGELOG.md +0 -159
@@ -0,0 +1,107 @@
1
+ import * as AmqpLib from "amqplib/callback_api";
2
+ import { AmqpProperties } from "..";
3
+ import { Binding } from "../Binding";
4
+ import { Connection } from "../Connection/Connection";
5
+ import { Exchange } from "../Exchange/Exchange";
6
+ import { Message } from "../Message";
7
+ import { DeclarationOptions } from "./DeclarationOptions";
8
+ import { DeleteResult } from "./DeleteResult";
9
+ import { InitializeResult } from "./InitializeResult";
10
+ import { StartConsumerResult } from "./StartConsumerResult";
11
+ /** Represents an AQMP queue. */
12
+ export declare class Queue {
13
+ connection: Connection;
14
+ private options;
15
+ /** A promise that resolves once the conneciton is initialized and the channel is created. */
16
+ initialized: Promise<InitializeResult>;
17
+ /** The AMQP channel. */
18
+ _channel: AmqpLib.Channel;
19
+ /** A promise that resolves when a consumer handler is registered and initialized. */
20
+ _consumerInitialized: Promise<StartConsumerResult>;
21
+ private _name;
22
+ _consumer: (msg: any, channel?: AmqpLib.Channel) => any;
23
+ private _consumerOptions;
24
+ private _consumerTag;
25
+ private _consumerStopping;
26
+ private _deleting;
27
+ private _closing;
28
+ private log;
29
+ /** Returns the name of the queue. */
30
+ get name(): string;
31
+ /**
32
+ * Initializes a new instance of the @see Queue class.
33
+ *
34
+ * @summary Waits until the given connection is initialized, then creates a channel on it and declares a queue with
35
+ * the given name.
36
+ * @param connection The AMQP connection.
37
+ * @param name The name of the queue.
38
+ * @param options Any queue declaring options.
39
+ * @constructor
40
+ */
41
+ constructor(connection: Connection, name: string, options?: DeclarationOptions);
42
+ /** Waits until the connection is initialized then creates a channel and declares the queue on it. */
43
+ _initialize(): void;
44
+ /**
45
+ * Directly sends a message to the underlying queue.
46
+ *
47
+ * @param message The AMQP message.
48
+ */
49
+ send(message: Message): void;
50
+ rpc(requestParameters: any): Promise<Message>;
51
+ /**
52
+ * Sets the prefetch of the current quere. This limits the amount of unacknowledged messages on a channel. If you
53
+ * already specified this in the options in the constructor you don't need to set it here again.
54
+ *
55
+ * For more information see {@link https://www.rabbitmq.com/consumer-prefetch.html}.
56
+ * @param count The maximum number of unacknowledged messages send to each listener of this queue.
57
+ */
58
+ prefetch(count: number): void;
59
+ recover(): Promise<void>;
60
+ /**
61
+ * Actives a consumer by binding the given handler to this queue.
62
+ *
63
+ * @param onMessage The message handler that is executed when a new message arrives.
64
+ * @param options Options for underlying amqplib. See
65
+ * {@link https://www.squaremobius.net/amqp.node/channel_api.html#channel_consume} for more info. You can also
66
+ * specify AMQP properties to set on reply messages that are fired when the given onMessage handler returns anything.
67
+ * @throws {Error} Rejects when a consumer is already bound to this queue.
68
+ * @returns A promise that resolves once the handler is bound to the queue.
69
+ */
70
+ activateConsumer(onMessage: (msg: Message) => any, options?: AmqpLib.Options.Consume & {
71
+ properties?: AmqpProperties;
72
+ }): Promise<StartConsumerResult>;
73
+ /**
74
+ * Initializes the consumer with a handler function. Resolves the @see _consumerInitialized promise once the handler
75
+ * is bound.
76
+ */
77
+ _initializeConsumer(): void;
78
+ /**
79
+ * Completely removes the consumer handler and cancels the channel.
80
+ */
81
+ stopConsumer(): Promise<void>;
82
+ /**
83
+ * Removes any bindings of this queue, the consumer handler and then deletes the queue.
84
+ */
85
+ delete(): Promise<DeleteResult>;
86
+ /**
87
+ * Remoevs bindings of this queue as well as the consumer handler and then closes the AMQP channel.
88
+ */
89
+ close(): Promise<void>;
90
+ /**
91
+ * Binds the queue to the given exchange.
92
+ *
93
+ * @param source The exchange on which to bind the queue.
94
+ * @param pattern The pattern to use.
95
+ * @param args Any arguments.
96
+ */
97
+ bind(source: Exchange, pattern?: string, args?: any): Promise<Binding>;
98
+ /**
99
+ * Unbinds the queue from the given exchange by deleting the binding.
100
+ *
101
+ * @param source The exchange to unbind from.
102
+ * @param pattern The pattern the queue was bind with.
103
+ * @param _args Any additional arguments.
104
+ */
105
+ unbind(source: Exchange, pattern?: string, _args?: any): Promise<void>;
106
+ private handleReceivedMessageEvent;
107
+ }
@@ -0,0 +1,339 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Queue = void 0;
4
+ const amqp_ts_1 = require("../amqp-ts");
5
+ const Binding_1 = require("../Binding");
6
+ const Message_1 = require("../Message");
7
+ /** Represents an AQMP queue. */
8
+ class Queue {
9
+ /**
10
+ * Initializes a new instance of the @see Queue class.
11
+ *
12
+ * @summary Waits until the given connection is initialized, then creates a channel on it and declares a queue with
13
+ * the given name.
14
+ * @param connection The AMQP connection.
15
+ * @param name The name of the queue.
16
+ * @param options Any queue declaring options.
17
+ * @constructor
18
+ */
19
+ constructor(connection, name, options = {}) {
20
+ this.connection = connection;
21
+ this.options = options;
22
+ this.log = this.connection.loggerFactory(this.constructor, { queue: name });
23
+ this._name = name;
24
+ this.connection._queues[this._name] = this;
25
+ this._initialize();
26
+ }
27
+ /** Returns the name of the queue. */
28
+ get name() {
29
+ return this._name;
30
+ }
31
+ /** Waits until the connection is initialized then creates a channel and declares the queue on it. */
32
+ _initialize() {
33
+ this.initialized = new Promise((resolve, reject) => {
34
+ this.connection.initialized
35
+ .then(() => {
36
+ this.connection.connection.createChannel((createChannelError, channel) => {
37
+ /* istanbul ignore if */
38
+ if (createChannelError) {
39
+ reject(createChannelError);
40
+ }
41
+ else {
42
+ this._channel = channel;
43
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
44
+ this._channel.on("delivery", this.handleReceivedMessageEvent.bind(this));
45
+ const callback = (err, ok) => {
46
+ /* istanbul ignore if */
47
+ if (err) {
48
+ this.log.error({ error: err }, "Failed to create queue '%s'.", this._name);
49
+ delete this.connection._queues[this._name];
50
+ reject(err);
51
+ }
52
+ else {
53
+ if (this.options.prefetch) {
54
+ this._channel.prefetch(this.options.prefetch);
55
+ }
56
+ resolve(ok);
57
+ }
58
+ };
59
+ if (this.options.noCreate) {
60
+ this._channel.checkQueue(this._name, callback);
61
+ }
62
+ else {
63
+ this._channel.assertQueue(this._name, this.options, callback);
64
+ }
65
+ }
66
+ });
67
+ })
68
+ .catch((err) => {
69
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
70
+ this.log.warn(err, "Channel failure, error caused during connection!");
71
+ });
72
+ });
73
+ }
74
+ /**
75
+ * Directly sends a message to the underlying queue.
76
+ *
77
+ * @param message The AMQP message.
78
+ */
79
+ send(message) {
80
+ message.sendTo(this);
81
+ }
82
+ rpc(requestParameters) {
83
+ return new Promise((resolve, reject) => {
84
+ const processRpc = () => {
85
+ let consumerTag;
86
+ this._channel.consume(amqp_ts_1.DIRECT_REPLY_TO_QUEUE, (resultMsg) => {
87
+ this._channel.cancel(consumerTag);
88
+ const result = new Message_1.Message(resultMsg.content, resultMsg.properties);
89
+ result.fields = resultMsg.fields;
90
+ resolve(result);
91
+ }, { noAck: true }, (err, ok) => {
92
+ /* istanbul ignore if */
93
+ if (err) {
94
+ reject(new Error("amqp-ts: Queue.rpc error: " + err.message));
95
+ }
96
+ else {
97
+ // send the rpc request
98
+ consumerTag = ok.consumerTag;
99
+ const message = new Message_1.Message(requestParameters, {
100
+ replyTo: amqp_ts_1.DIRECT_REPLY_TO_QUEUE,
101
+ });
102
+ message.sendTo(this);
103
+ }
104
+ });
105
+ };
106
+ this.initialized.then(processRpc);
107
+ });
108
+ }
109
+ /**
110
+ * Sets the prefetch of the current quere. This limits the amount of unacknowledged messages on a channel. If you
111
+ * already specified this in the options in the constructor you don't need to set it here again.
112
+ *
113
+ * For more information see {@link https://www.rabbitmq.com/consumer-prefetch.html}.
114
+ * @param count The maximum number of unacknowledged messages send to each listener of this queue.
115
+ */
116
+ prefetch(count) {
117
+ this.initialized.then(() => {
118
+ this._channel.prefetch(count);
119
+ this.options.prefetch = count;
120
+ });
121
+ }
122
+ recover() {
123
+ return new Promise((resolve, reject) => {
124
+ this.initialized.then(() => {
125
+ this._channel.recover((err, _ok) => {
126
+ if (err) {
127
+ reject(err);
128
+ }
129
+ else {
130
+ resolve(null);
131
+ }
132
+ });
133
+ });
134
+ });
135
+ }
136
+ /**
137
+ * Actives a consumer by binding the given handler to this queue.
138
+ *
139
+ * @param onMessage The message handler that is executed when a new message arrives.
140
+ * @param options Options for underlying amqplib. See
141
+ * {@link https://www.squaremobius.net/amqp.node/channel_api.html#channel_consume} for more info. You can also
142
+ * specify AMQP properties to set on reply messages that are fired when the given onMessage handler returns anything.
143
+ * @throws {Error} Rejects when a consumer is already bound to this queue.
144
+ * @returns A promise that resolves once the handler is bound to the queue.
145
+ */
146
+ activateConsumer(onMessage, options = {}) {
147
+ if (this._consumerInitialized !== undefined) {
148
+ return Promise.reject(new Error("amqp-ts Queue.activateConsumer error: consumer already defined"));
149
+ }
150
+ this._consumerOptions = options;
151
+ this._consumer = onMessage;
152
+ this._initializeConsumer();
153
+ return this._consumerInitialized;
154
+ }
155
+ /**
156
+ * Initializes the consumer with a handler function. Resolves the @see _consumerInitialized promise once the handler
157
+ * is bound.
158
+ */
159
+ _initializeConsumer() {
160
+ const activateConsumerWrapper = (msg) => {
161
+ try {
162
+ const message = new Message_1.Message(msg.content, msg.properties);
163
+ message.fields = msg.fields;
164
+ message._message = msg;
165
+ message._channel = this._channel;
166
+ const result = this._consumer(message);
167
+ // convert the result to a promise if it isn't one already
168
+ Promise.resolve(result)
169
+ .then((resultValue) => {
170
+ var _a;
171
+ // check if there is a reply-to
172
+ if (msg.properties.replyTo && resultValue) {
173
+ if (!(resultValue instanceof Message_1.Message)) {
174
+ resultValue = new Message_1.Message(resultValue, (_a = this._consumerOptions.properties) !== null && _a !== void 0 ? _a : {});
175
+ }
176
+ resultValue.properties.correlationId = msg.properties.correlationId;
177
+ this.log.debug("Replying directly to queue %s", msg.properties.replyTo);
178
+ this._channel.sendToQueue(msg.properties.replyTo, resultValue.content, resultValue.properties);
179
+ }
180
+ })
181
+ .catch((err) => {
182
+ this.log.error({ err, correlationId: msg.properties.correlationId, consumerTag: msg.fields.consumerTag }, "Replying on message %s throw an error: %s", msg.properties.correlationId, err.message);
183
+ });
184
+ }
185
+ catch (err) {
186
+ /* istanbul ignore next */
187
+ this.log.error({ err, correlationId: msg.properties.correlationId, consumerTag: msg.fields.consumerTag }, "Consuming the message %s returned error: %s", msg.properties.correlationId, err.message);
188
+ }
189
+ };
190
+ this._consumerInitialized = new Promise((resolve, reject) => {
191
+ this.initialized.then(() => {
192
+ this._channel.consume(this._name, activateConsumerWrapper, this._consumerOptions, (err, ok) => {
193
+ /* istanbul ignore if */
194
+ if (err) {
195
+ reject(err);
196
+ }
197
+ else {
198
+ this._consumerTag = ok.consumerTag;
199
+ resolve(ok);
200
+ }
201
+ });
202
+ });
203
+ });
204
+ }
205
+ /**
206
+ * Completely removes the consumer handler and cancels the channel.
207
+ */
208
+ stopConsumer() {
209
+ if (this._consumerStopping || this._consumerInitialized == undefined) {
210
+ return Promise.resolve();
211
+ }
212
+ this._consumerStopping = true;
213
+ return new Promise((resolve, reject) => {
214
+ this._consumerInitialized.then(() => {
215
+ this._channel.cancel(this._consumerTag, (err, _ok) => {
216
+ /* istanbul ignore if */
217
+ if (err) {
218
+ reject(err);
219
+ }
220
+ else {
221
+ delete this._consumerInitialized;
222
+ delete this._consumer;
223
+ delete this._consumerOptions;
224
+ delete this._consumerStopping;
225
+ resolve();
226
+ }
227
+ });
228
+ });
229
+ });
230
+ }
231
+ /**
232
+ * Removes any bindings of this queue, the consumer handler and then deletes the queue.
233
+ */
234
+ delete() {
235
+ if (this._deleting === undefined) {
236
+ this._deleting = new Promise((resolve, reject) => {
237
+ this.initialized
238
+ .then(() => {
239
+ return Binding_1.Binding.removeBindingsContaining(this);
240
+ })
241
+ .then(() => {
242
+ return this.stopConsumer();
243
+ })
244
+ .then(() => {
245
+ return this._channel.deleteQueue(this._name, {}, (deleteQueueError, ok) => {
246
+ /* istanbul ignore if */
247
+ if (deleteQueueError) {
248
+ reject(deleteQueueError);
249
+ }
250
+ else {
251
+ delete this.initialized; // invalidate queue
252
+ delete this.connection._queues[this._name]; // remove the queue from our administration
253
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
254
+ this._channel.removeListener("delivery", this.handleReceivedMessageEvent.bind(this));
255
+ this._channel.close((channelCloseError) => {
256
+ /* istanbul ignore if */
257
+ if (channelCloseError) {
258
+ reject(channelCloseError);
259
+ }
260
+ else {
261
+ delete this._channel;
262
+ delete this.connection;
263
+ resolve(ok);
264
+ }
265
+ });
266
+ }
267
+ });
268
+ })
269
+ .catch((err) => {
270
+ reject(err);
271
+ });
272
+ });
273
+ }
274
+ return this._deleting;
275
+ }
276
+ /**
277
+ * Remoevs bindings of this queue as well as the consumer handler and then closes the AMQP channel.
278
+ */
279
+ close() {
280
+ if (this._closing === undefined) {
281
+ this._closing = new Promise((resolve, reject) => {
282
+ this.initialized
283
+ .then(() => {
284
+ return Binding_1.Binding.removeBindingsContaining(this);
285
+ })
286
+ .then(() => {
287
+ return this.stopConsumer();
288
+ })
289
+ .then(() => {
290
+ delete this.initialized; // invalidate queue
291
+ delete this.connection._queues[this._name]; // remove the queue from our administration
292
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
293
+ this._channel.removeListener("delivery", this.handleReceivedMessageEvent.bind(this));
294
+ this._channel.close((err) => {
295
+ /* istanbul ignore if */
296
+ if (err) {
297
+ reject(err);
298
+ }
299
+ else {
300
+ delete this._channel;
301
+ delete this.connection;
302
+ resolve(null);
303
+ }
304
+ });
305
+ })
306
+ .catch((err) => {
307
+ reject(err);
308
+ });
309
+ });
310
+ }
311
+ return this._closing;
312
+ }
313
+ /**
314
+ * Binds the queue to the given exchange.
315
+ *
316
+ * @param source The exchange on which to bind the queue.
317
+ * @param pattern The pattern to use.
318
+ * @param args Any arguments.
319
+ */
320
+ bind(source, pattern = "", args = {}) {
321
+ const binding = new Binding_1.Binding(this, source, pattern, args);
322
+ return binding.initialized;
323
+ }
324
+ /**
325
+ * Unbinds the queue from the given exchange by deleting the binding.
326
+ *
327
+ * @param source The exchange to unbind from.
328
+ * @param pattern The pattern the queue was bind with.
329
+ * @param _args Any additional arguments.
330
+ */
331
+ unbind(source, pattern = "", _args = {}) {
332
+ return this.connection._bindings[Binding_1.Binding.id(this, source, pattern)].delete();
333
+ }
334
+ handleReceivedMessageEvent(_args) {
335
+ this.connection._increaseCounter("receivedMessages");
336
+ }
337
+ }
338
+ exports.Queue = Queue;
339
+ //# sourceMappingURL=Queue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Queue.js","sourceRoot":"","sources":["../../src/Queue/Queue.ts"],"names":[],"mappings":";;;AAMA,wCAAmD;AACnD,wCAAqC;AAIrC,wCAAqC;AAMrC,gCAAgC;AAChC,MAAa,KAAK;IAqBhB;;;;;;;;;OASG;IACH,YAAmB,UAAsB,EAAE,IAAY,EAAU,UAA8B,EAAE;QAA9E,eAAU,GAAV,UAAU,CAAY;QAAwB,YAAO,GAAP,OAAO,CAAyB;QAC/F,IAAI,CAAC,GAAG,GAAG,IAAI,CAA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YACP,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CAAC,MAAgB,EAAE,OAAO,GAAG,EAAE,EAAE,OAAY,EAAE;QACxD,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACzD,OAAO,OAAO,CAAC,WAAW,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,MAAgB,EAAE,OAAO,GAAG,EAAE,EAAE,QAAa,EAAE;QAC3D,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,iBAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/E,CAAC;IAEO,0BAA0B,CAAC,KAAY;QAC7C,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;IACvD,CAAC;CACF;AAnXD,sBAmXC"}
@@ -0,0 +1,5 @@
1
+ /** The result of a consumer initialization. */
2
+ export interface StartConsumerResult {
3
+ /** The tag of the consumer. */
4
+ consumerTag: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=StartConsumerResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StartConsumerResult.js","sourceRoot":"","sources":["../../src/Queue/StartConsumerResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Created by Ab on 17-9-2015.
3
+ *
4
+ * methods and properties starting with '_' signify that the scope of the item should be limited to
5
+ * the inside of the enclosing namespace.
6
+ */
7
+ /** Name of the current application determined by AMQP_APPLICATIONNAME env or the name of the dir we're running in. */
8
+ export declare const ApplicationName: string;
9
+ export declare const DIRECT_REPLY_TO_QUEUE = "amq.rabbitmq.reply-to";
package/lib/amqp-ts.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Created by Ab on 17-9-2015.
4
+ *
5
+ * methods and properties starting with '_' signify that the scope of the item should be limited to
6
+ * the inside of the enclosing namespace.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DIRECT_REPLY_TO_QUEUE = exports.ApplicationName = void 0;
10
+ // simplified use of amqp exchanges and queues, wrapper for amqplib
11
+ const path = require("path");
12
+ /** Name of the current application determined by AMQP_APPLICATIONNAME env or the name of the dir we're running in. */
13
+ exports.ApplicationName = process.env.AMQP_APPLICATIONNAME ||
14
+ (process.argv.length > 1
15
+ ? path.parse
16
+ ? path.parse(process.argv[1]).name
17
+ : path.basename(process.argv[1])
18
+ : "amqpApp");
19
+ // name for the RabbitMQ direct reply-to queue
20
+ exports.DIRECT_REPLY_TO_QUEUE = "amq.rabbitmq.reply-to";
21
+ //# sourceMappingURL=amqp-ts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amqp-ts.js","sourceRoot":"","sources":["../src/amqp-ts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mEAAmE;AAEnE,6BAA6B;AAE7B,sHAAsH;AACzG,QAAA,eAAe,GAC1B,OAAO,CAAC,GAAG,CAAC,oBAAoB;IAChC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;QACtB,CAAC,CAAC,IAAI,CAAC,KAAK;YACV,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;YAClC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,SAAS,CAAC,CAAC;AAEjB,8CAA8C;AACjC,QAAA,qBAAqB,GAAG,uBAAuB,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import type { AmqpProperties } from "./AmqpProperties";
2
+ import { Binding } from "./Binding";
3
+ import { Connection } from "./Connection/Connection";
4
+ import type { ConnectionMetrics } from "./Connection/ConnectionMetrics";
5
+ import type { ReconnectStrategy } from "./Connection/ReconnectStrategy";
6
+ import type { Topology } from "./Connection/Topology";
7
+ import type { DeclarationOptions as ExchangeDeclarationOptions } from "./Exchange/DeclarationOptions";
8
+ import { Exchange } from "./Exchange/Exchange";
9
+ import type { ExchangeType } from "./Exchange/ExchangeType";
10
+ import type { LoggerFactory } from "./LoggerFactory";
11
+ import { Message } from "./Message";
12
+ import type { DeclarationOptions as QueueDeclarationOptions } from "./Queue/DeclarationOptions";
13
+ import { Queue } from "./Queue/Queue";
14
+ export { AmqpProperties, Binding, Connection, ConnectionMetrics, Exchange, ExchangeDeclarationOptions, ExchangeType, LoggerFactory, Message, Queue, QueueDeclarationOptions, ReconnectStrategy, Topology, };
package/lib/index.js ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Queue = exports.Message = exports.Exchange = exports.Connection = exports.Binding = void 0;
4
+ const Binding_1 = require("./Binding");
5
+ Object.defineProperty(exports, "Binding", { enumerable: true, get: function () { return Binding_1.Binding; } });
6
+ const Connection_1 = require("./Connection/Connection");
7
+ Object.defineProperty(exports, "Connection", { enumerable: true, get: function () { return Connection_1.Connection; } });
8
+ const Exchange_1 = require("./Exchange/Exchange");
9
+ Object.defineProperty(exports, "Exchange", { enumerable: true, get: function () { return Exchange_1.Exchange; } });
10
+ const Message_1 = require("./Message");
11
+ Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return Message_1.Message; } });
12
+ const Queue_1 = require("./Queue/Queue");
13
+ Object.defineProperty(exports, "Queue", { enumerable: true, get: function () { return Queue_1.Queue; } });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,uCAAoC;AAelC,wFAfO,iBAAO,OAeP;AAdT,wDAAqD;AAenD,2FAfO,uBAAU,OAeP;AAVZ,kDAA+C;AAY7C,yFAZO,mBAAQ,OAYP;AATV,uCAAoC;AAalC,wFAbO,iBAAO,OAaP;AAXT,yCAAsC;AAYpC,sFAZO,aAAK,OAYP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@droidsolutions-oss/amqp-ts",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "description": "Easy to use AMQP library written in Typescript (using amqplib).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,37 +36,37 @@
36
36
  "amqplib": "^0.8.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@commitlint/cli": "12.1.4",
40
- "@commitlint/config-conventional": "12.1.4",
41
- "@semantic-release/changelog": "^5.0.1",
42
- "@semantic-release/git": "^9.0.0",
43
- "@types/amqplib": "0.8.1",
44
- "@types/chai-as-promised": "7.1.4",
45
- "@types/mocha": "8.2.3",
46
- "@types/node": "16.3.2",
47
- "@types/pino": "6.3.9",
48
- "@typescript-eslint/eslint-plugin": "4.28.3",
49
- "@typescript-eslint/parser": "4.28.3",
50
- "chai": "4.3.4",
51
- "chai-as-promised": "^7.1.1",
39
+ "@commitlint/cli": "16.2.1",
40
+ "@commitlint/config-conventional": "16.2.1",
41
+ "@semantic-release/changelog": "6.0.1",
42
+ "@semantic-release/git": "10.0.1",
43
+ "@types/amqplib": "0.8.2",
44
+ "@types/chai-as-promised": "7.1.5",
45
+ "@types/mocha": "9.1.0",
46
+ "@types/node": "17.0.18",
47
+ "@types/pino": "6.3.12",
48
+ "@typescript-eslint/eslint-plugin": "5.12.0",
49
+ "@typescript-eslint/parser": "5.12.0",
50
+ "chai": "4.3.6",
51
+ "chai-as-promised": "7.1.1",
52
52
  "del": "6.0.0",
53
- "eslint": "7.30.0",
54
- "eslint-config-prettier": "8.3.0",
55
- "eslint-plugin-mocha": "9.0.0",
53
+ "eslint": "8.9.0",
54
+ "eslint-config-prettier": "8.4.0",
55
+ "eslint-plugin-mocha": "10.0.3",
56
56
  "eslint-plugin-node": "11.1.0",
57
- "husky": "7.0.1",
58
- "line-reader": "^0.4.0",
57
+ "husky": "7.0.4",
58
+ "line-reader": "0.4.0",
59
59
  "merge2": "1.4.1",
60
- "mocha": "9.0.2",
60
+ "mocha": "9.2.1",
61
61
  "nyc": "15.1.0",
62
- "pino": "6.12.0",
63
- "pino-pretty": "5.1.1",
64
- "prettier": "2.3.2",
65
- "rimraf": "^3.0.2",
66
- "semantic-release": "17.4.4",
67
- "source-map-support": "0.5.19",
68
- "ts-node": "10.1.0",
69
- "typescript": "4.3.5"
62
+ "pino": "6.13.3",
63
+ "pino-pretty": "7.5.1",
64
+ "prettier": "2.5.1",
65
+ "rimraf": "3.0.2",
66
+ "semantic-release": "19.0.2",
67
+ "source-map-support": "0.5.21",
68
+ "ts-node": "10.5.0",
69
+ "typescript": "4.5.5"
70
70
  },
71
71
  "engines": {
72
72
  "node": ">=12"
@@ -83,6 +83,14 @@
83
83
  ]
84
84
  },
85
85
  "release": {
86
+ "branches": [
87
+ "main",
88
+ "master",
89
+ {
90
+ "name": "develop",
91
+ "prerelease": true
92
+ }
93
+ ],
86
94
  "plugins": [
87
95
  "@semantic-release/commit-analyzer",
88
96
  "@semantic-release/release-notes-generator",