@droidsolutions-oss/amqp-ts 2.5.1 → 2.6.2
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 +23 -16
- package/lib/Connection/Connection.d.ts +18 -4
- package/lib/Connection/Connection.js +31 -3
- package/lib/Connection/Connection.js.map +1 -1
- package/lib/Connection/ConnectionMetrics.d.ts +7 -0
- package/lib/Connection/ConnectionMetrics.js +3 -0
- package/lib/Connection/ConnectionMetrics.js.map +1 -0
- package/lib/Message.js +2 -1
- package/lib/Message.js.map +1 -1
- package/lib/Queue/Queue.d.ts +1 -0
- package/lib/Queue/Queue.js +10 -0
- package/lib/Queue/Queue.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js.map +1 -1
- package/package.json +28 -28
- package/CHANGELOG.md +0 -173
package/README.md
CHANGED
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
This is a fork of [amqp-ts](https://github.com/abreits/amqp-ts).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
# Table of Contents
|
|
10
10
|
|
|
11
11
|
- [Overview](#overview)
|
|
12
12
|
- [Usage](#usage)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# Overview <a name="overview"></a>
|
|
15
15
|
|
|
16
16
|
Amqp-ts is a library for nodejs that simplifies communication with AMQP message busses written in Typescript. It has been tested on RabbitMQ. It uses the [amqplib](http://www.squaremobius.net/amqp.node/) library by [Michael Bridgen (squaremo)](https://github.com/squaremo).
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
## Difference to the original library
|
|
19
19
|
|
|
20
20
|
Changes to the [original amqp-ts](https://github.com/abreits/amqp-ts) package:
|
|
21
21
|
|
|
@@ -24,15 +24,16 @@ Changes to the [original amqp-ts](https://github.com/abreits/amqp-ts) package:
|
|
|
24
24
|
- dropped winston as dependency, instead a factory can be provided to the connection constructor which returns any logger.
|
|
25
25
|
- the deprecated methods like `Exchange.publish`, `Exchange.startConsumer`, `Queue.publish` and `Queue.startConsumer` are removed from this library, since their replacements like `Exchange.send` and `Exchange.activateConsumer` already existed.
|
|
26
26
|
- fixes for https://github.com/abreits/amqp-ts/pull/46 and https://github.com/abreits/amqp-ts/issues/20 have been implemented
|
|
27
|
+
- add basic metrics
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
## Defining Features
|
|
29
30
|
|
|
30
31
|
- [High level non opinioned library], no need to worry about channels etc.
|
|
31
32
|
- ['Lazy' initialization](#initialization), async AMQP dependencies are resolved automatically
|
|
32
33
|
- [Automatic reconnection](#reconnect), when the connection with the AMQP server fails, the whole connection and configuration is rebuilt automatically
|
|
33
34
|
- Written in typescript.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
## Current status
|
|
36
37
|
|
|
37
38
|
The library is considered production ready.
|
|
38
39
|
|
|
@@ -40,18 +41,18 @@ It does depend on the following npm libraries:
|
|
|
40
41
|
|
|
41
42
|
- [amqplib](http://www.squaremobius.net/amqp.node/)
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
## Lazy Initialization <a name="initialization"></a>
|
|
44
45
|
|
|
45
46
|
No need to nest functionality, just create a connection, declare your exchanges, queues and
|
|
46
47
|
bindings and send and receive messages. The library takes care of any direct dependencies.
|
|
47
48
|
|
|
48
49
|
If you define an exchange and a queue and bind the queue to the exchange and want to make sure that the queue is connected to the exchange before you send a message to the exchange you can call the `connection.completeConfiguration()` method and act on the promise it returns.
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
# Usage <a name="usage"></a>
|
|
51
52
|
|
|
52
53
|
There are multiple ways to declare your exchanges, queues and bindings. Each of those has an `initialized` property which is a promise that resolves when initialization is complete. You can either await it yourself or call `completeConfiguration` on the connection like explained in [Lazy initialization](#initialization).
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
## Async Typescript Example
|
|
55
56
|
|
|
56
57
|
```ts
|
|
57
58
|
import { Connection, Message } from "amqp-ts";
|
|
@@ -72,7 +73,7 @@ await queue.activateConsumer((message: Message) => {
|
|
|
72
73
|
});
|
|
73
74
|
```
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
## Lazy Typescript Example
|
|
76
77
|
|
|
77
78
|
```ts
|
|
78
79
|
import { Connection, Message } from "amqp-ts";
|
|
@@ -100,7 +101,7 @@ exchange.send(msg2);
|
|
|
100
101
|
|
|
101
102
|
More examples can be found in the [tutorials directory](https://github.com/abreits/amqp-ts/tree/master/tutorials).
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
## Messages
|
|
104
105
|
|
|
105
106
|
A message consists of the content (the data you want to send) and some optional properties that are defined by AMQP. This metadata offers some ways for consumers and providers to know how to process a message. For example when you provide an object as content then it is converted to a JSON string and the `contentType` property is set to `application/json`. This way the consumer knows, that the message should be parsed from json. For a detailed guide on the properties, you can refer to [the RabbitMQ documentation](https://www.rabbitmq.com/consumers.html#message-properties).
|
|
106
107
|
|
|
@@ -111,7 +112,7 @@ Properties that are set by this library are:
|
|
|
111
112
|
- timestamp - if not set by you it will be set to the current timestamp in UTC
|
|
112
113
|
- correlationId - if it is specified by the incoming message it will be set to the automatic reply (see below)
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
## Logging
|
|
115
116
|
|
|
116
117
|
The last argument of the `Connection` constructor takes a logger factory function. If you specify it, the function should return a logger that matches the `SimpleLogger` interface. This type is heavily inspired by the style of [Pino](https://github.com/pinojs/pino), but you can write a wrapper for any logger you like. It should support `%s`, `%d` and `%o` string interpolation, as they are used for internal log messages.
|
|
117
118
|
|
|
@@ -213,11 +214,11 @@ const loggerFactory = (context, meta) => {
|
|
|
213
214
|
};
|
|
214
215
|
```
|
|
215
216
|
|
|
216
|
-
|
|
217
|
+
## Connection Status
|
|
217
218
|
|
|
218
219
|
To know the status of the connection: `connection.isConnected`. Returns true if the connection exists and false, otherwise.
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
## Events
|
|
221
222
|
|
|
222
223
|
#on('open_connection', function() {...})
|
|
223
224
|
|
|
@@ -243,15 +244,15 @@ It is emitted when the connection is re-established.
|
|
|
243
244
|
|
|
244
245
|
It's emitted when a error is registered during the connection.
|
|
245
246
|
|
|
246
|
-
|
|
247
|
+
## Automatic Reconnection <a name="reconnect"></a>
|
|
247
248
|
|
|
248
249
|
When the library detects that the connection with the AMQP server is lost, it tries to automatically reconnect to the server.
|
|
249
250
|
|
|
250
|
-
|
|
251
|
+
## Automatic JSON content
|
|
251
252
|
|
|
252
253
|
If your message content is not a string and not a buffer it is converted automatically to a JSON string. The `contentType` is set to `application/json` and the `contentEncoding` is set to `utf-8`. Vice versa if you call `getContent()` on the message and the `contentType` is set to `application/json` the string will be parsed and the parsed result will be returned. If you want to avoid the `any` type you can use `getJsonContent<T>()` instead. This method throws an error, if the `contentType` is not set to `application/json`.
|
|
253
254
|
|
|
254
|
-
|
|
255
|
+
## Automatic ReplyTo
|
|
255
256
|
|
|
256
257
|
If your message consumer returns a value and the `replyTo` property is set in the message property, the value is send to the queue given in the `replyTo` field. The correlationId is set to the response message if it is set in the request. If you want to set other properties you can specify them when calling `activateConsumer` i nthe options. If you don't return any value (a.k.a return `undefined`) no automatic reply is send. You have manage this by yourself then.
|
|
257
258
|
|
|
@@ -303,3 +304,9 @@ await queue.activateConsumer((message: Message) => {
|
|
|
303
304
|
return { my: "result" };
|
|
304
305
|
});
|
|
305
306
|
```
|
|
307
|
+
|
|
308
|
+
## Metrics
|
|
309
|
+
|
|
310
|
+
The connection instance offers a method that returns basic metrics of the connection. For the metrics there is a TypeScript interface `ConnectionMetrics` that contains possible metrics of the connection.
|
|
311
|
+
|
|
312
|
+
To receive them you can call `getMetrics()` on the connection instance.
|
|
@@ -6,8 +6,9 @@ import { DeclarationOptions as ExchangeDeclarationOptions } from "../Exchange/De
|
|
|
6
6
|
import { Exchange } from "../Exchange/Exchange";
|
|
7
7
|
import { ExchangeType } from "../Exchange/ExchangeType";
|
|
8
8
|
import { LoggerFactory } from "../LoggerFactory";
|
|
9
|
-
import { DeclarationOptions as
|
|
9
|
+
import { DeclarationOptions as QueueDeclarationOptions } from "../Queue/DeclarationOptions";
|
|
10
10
|
import { Queue } from "../Queue/Queue";
|
|
11
|
+
import { ConnectionMetrics } from "./ConnectionMetrics";
|
|
11
12
|
import { ReconnectStrategy } from "./ReconnectStrategy";
|
|
12
13
|
import { Topology } from "./Topology";
|
|
13
14
|
export declare class Connection extends EventEmitter {
|
|
@@ -32,6 +33,8 @@ export declare class Connection extends EventEmitter {
|
|
|
32
33
|
private _rebuilding;
|
|
33
34
|
private _isClosing;
|
|
34
35
|
private log;
|
|
36
|
+
private _sentMessagesCounter;
|
|
37
|
+
private _receivedMessagesCounter;
|
|
35
38
|
/**
|
|
36
39
|
*
|
|
37
40
|
* @param url The url to RabbitMQ
|
|
@@ -56,7 +59,7 @@ export declare class Connection extends EventEmitter {
|
|
|
56
59
|
*/
|
|
57
60
|
deleteConfiguration(): Promise<any>;
|
|
58
61
|
/**
|
|
59
|
-
* Declares a new exchange. Dependent on the options it auto creates the exchange if it
|
|
62
|
+
* Declares a new exchange. Dependent on the options it auto creates the exchange if it does not already exists.
|
|
60
63
|
*
|
|
61
64
|
* @param name The name of the exchange.
|
|
62
65
|
* @param type The type
|
|
@@ -80,7 +83,7 @@ export declare class Connection extends EventEmitter {
|
|
|
80
83
|
* @param options Any options for the queue declaration.
|
|
81
84
|
* @returns The queue.
|
|
82
85
|
*/
|
|
83
|
-
declareQueue(name: string, options?:
|
|
86
|
+
declareQueue(name: string, options?: QueueDeclarationOptions): Queue;
|
|
84
87
|
/**
|
|
85
88
|
* Declares a new queue and waits until it is intitialized.
|
|
86
89
|
*
|
|
@@ -88,8 +91,19 @@ export declare class Connection extends EventEmitter {
|
|
|
88
91
|
* @param options Any options for the queue declaration.
|
|
89
92
|
* @returns A promise that resolves when the queue is declared and initialized.
|
|
90
93
|
*/
|
|
91
|
-
declareQueueAsync(name: string, options?:
|
|
94
|
+
declareQueueAsync(name: string, options?: QueueDeclarationOptions): Promise<Queue>;
|
|
92
95
|
declareTopology(topology: Topology): Promise<any>;
|
|
93
96
|
get getConnection(): AmqpLib.Connection;
|
|
97
|
+
/**
|
|
98
|
+
* Returns an object with metrics about the connection.
|
|
99
|
+
* @returns An object containing metrics about the connection.
|
|
100
|
+
*/
|
|
101
|
+
getMetrics(): ConnectionMetrics;
|
|
94
102
|
private rebuildConnection;
|
|
103
|
+
/**
|
|
104
|
+
* Increments an internal counter.
|
|
105
|
+
* @param counter The counter to increase.
|
|
106
|
+
* @param value The increment, default is 1.
|
|
107
|
+
*/
|
|
108
|
+
_increaseCounter(counter: "receivedMessages" | "sentMessages", value?: number): void;
|
|
95
109
|
}
|
|
@@ -21,6 +21,8 @@ class Connection extends events_1.EventEmitter {
|
|
|
21
21
|
this.connectedBefore = false;
|
|
22
22
|
this._rebuilding = false;
|
|
23
23
|
this._isClosing = false;
|
|
24
|
+
this._sentMessagesCounter = 0;
|
|
25
|
+
this._receivedMessagesCounter = 0;
|
|
24
26
|
if (!this.loggerFactory) {
|
|
25
27
|
this.loggerFactory = (_, __) => new LoggerFactory_1.EmtpyLogger();
|
|
26
28
|
}
|
|
@@ -50,7 +52,7 @@ class Connection extends events_1.EventEmitter {
|
|
|
50
52
|
this.log.warn("Connection retry %d in %d ms", retry + 1, thisConnection.reconnectStrategy.interval);
|
|
51
53
|
thisConnection.emit("trying_connect");
|
|
52
54
|
setTimeout(
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
54
56
|
thisConnection.tryToConnect.bind(this), thisConnection.reconnectStrategy.interval, thisConnection, retry + 1, callback);
|
|
55
57
|
}
|
|
56
58
|
else {
|
|
@@ -185,7 +187,7 @@ class Connection extends events_1.EventEmitter {
|
|
|
185
187
|
return Promise.all(promises);
|
|
186
188
|
}
|
|
187
189
|
/**
|
|
188
|
-
* Declares a new exchange. Dependent on the options it auto creates the exchange if it
|
|
190
|
+
* Declares a new exchange. Dependent on the options it auto creates the exchange if it does not already exists.
|
|
189
191
|
*
|
|
190
192
|
* @param name The name of the exchange.
|
|
191
193
|
* @param type The type
|
|
@@ -245,7 +247,8 @@ class Connection extends events_1.EventEmitter {
|
|
|
245
247
|
if (topology.exchanges !== undefined) {
|
|
246
248
|
for (i = 0, len = topology.exchanges.length; i < len; i++) {
|
|
247
249
|
const exchange = topology.exchanges[i];
|
|
248
|
-
promises.push(this.declareExchange(exchange.name, exchange.type, exchange.options)
|
|
250
|
+
promises.push(this.declareExchange(exchange.name, exchange.type, exchange.options)
|
|
251
|
+
.initialized);
|
|
249
252
|
}
|
|
250
253
|
}
|
|
251
254
|
if (topology.queues !== undefined) {
|
|
@@ -273,6 +276,16 @@ class Connection extends events_1.EventEmitter {
|
|
|
273
276
|
get getConnection() {
|
|
274
277
|
return this.connection;
|
|
275
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Returns an object with metrics about the connection.
|
|
281
|
+
* @returns An object containing metrics about the connection.
|
|
282
|
+
*/
|
|
283
|
+
getMetrics() {
|
|
284
|
+
return {
|
|
285
|
+
receivedMessagesCounter: this._receivedMessagesCounter,
|
|
286
|
+
sentMessagesCounter: this._sentMessagesCounter,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
276
289
|
rebuildConnection() {
|
|
277
290
|
if (this._rebuilding) {
|
|
278
291
|
// only one rebuild process can be active at any time
|
|
@@ -313,6 +326,21 @@ class Connection extends events_1.EventEmitter {
|
|
|
313
326
|
});
|
|
314
327
|
return this.initialized;
|
|
315
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* Increments an internal counter.
|
|
331
|
+
* @param counter The counter to increase.
|
|
332
|
+
* @param value The increment, default is 1.
|
|
333
|
+
*/
|
|
334
|
+
_increaseCounter(counter, value = 1) {
|
|
335
|
+
switch (counter) {
|
|
336
|
+
case "receivedMessages":
|
|
337
|
+
this._receivedMessagesCounter += value;
|
|
338
|
+
break;
|
|
339
|
+
case "sentMessages":
|
|
340
|
+
this._sentMessagesCounter += value;
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
316
344
|
}
|
|
317
345
|
exports.Connection = Connection;
|
|
318
346
|
//# sourceMappingURL=Connection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../src/Connection/Connection.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAChD,mCAAsC;AAGtC,mDAAgD;AAEhD,oDAA4E;AAE5E,0CAAuC;
|
|
1
|
+
{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../src/Connection/Connection.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAChD,mCAAsC;AAGtC,mDAAgD;AAEhD,oDAA4E;AAE5E,0CAAuC;AAKvC,MAAa,UAAW,SAAQ,qBAAY;IAyB1C;;;;;;OAMG;IACH,YACE,GAAG,GAAG,kBAAkB,EACxB,gBAAqB,EAAE,EACvB,oBAAuC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAC9D,aAA6B;QAEpC,KAAK,EAAE,CAAC;QAFD,kBAAa,GAAb,aAAa,CAAgB;QAjC/B,gBAAW,GAAG,KAAK,CAAC;QAcnB,oBAAe,GAAG,KAAK,CAAC;QAExB,gBAAW,GAAG,KAAK,CAAC;QACpB,eAAU,GAAG,KAAK,CAAC;QAEnB,yBAAoB,GAAG,CAAC,CAAC;QACzB,6BAAwB,GAAG,CAAC,CAAC;QAgBnC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,EAAE,EAAE,EAAgB,EAAE,CAAC,IAAI,2BAAW,EAAE,CAAC;SACjE;QACD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QAEvE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,mEAAmE;QACnE,IAAI,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AI,CAAC,gCAAgC,CAAC,CAAC;wBAChD,IAAI,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;qBACxC;yBAAM;wBACL,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;wBAC9C,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;wBAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;qBAC7B;oBACD,OAAO,CAAC,IAAI,CAAC,CAAC;iBACf;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,0BAA0B;QAC1B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;YACpC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,4BAA4B,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;YACnC,cAAc;QAChB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,gBAAgB,CAAC,OAA4C,EAAE,KAAK,GAAG,CAAC;QAC7E,QAAQ,OAAO,EAAE;YACf,KAAK,kBAAkB;gBACrB,IAAI,CAAC,wBAAwB,IAAI,KAAK,CAAC;gBACvC,MAAM;YACR,KAAK,cAAc;gBACjB,IAAI,CAAC,oBAAoB,IAAI,KAAK,CAAC;gBACnC,MAAM;SACT;IACH,CAAC;CACF;AA9XD,gCA8XC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionMetrics.js","sourceRoot":"","sources":["../../src/Connection/ConnectionMetrics.ts"],"names":[],"mappings":""}
|
package/lib/Message.js
CHANGED
|
@@ -58,10 +58,11 @@ class Message {
|
|
|
58
58
|
const sendMessage = () => {
|
|
59
59
|
try {
|
|
60
60
|
if (!this.properties.timestamp) {
|
|
61
|
-
// Set
|
|
61
|
+
// Set timestamp if not set by user
|
|
62
62
|
this.properties.timestamp = Math.floor(new Date().getTime() / 1000);
|
|
63
63
|
}
|
|
64
64
|
destination._channel.publish(exchange, routingKey, this.content, this.properties);
|
|
65
|
+
destination.connection._increaseCounter("sentMessages");
|
|
65
66
|
}
|
|
66
67
|
catch (err) {
|
|
67
68
|
const log = destination.connection.loggerFactory(this.constructor);
|
package/lib/Message.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../src/Message.ts"],"names":[],"mappings":";;;AAKA,yCAAsC;AAEtC;;GAEG;AACH,MAAa,OAAO;IAWlB;;;;;;;;OAQG;IACH,6EAA6E;IAC7E,YAAY,OAAa,EAAE,UAA0B,EAAE;QACrD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;QAC1B,IAAI,OAAO,KAAK,SAAS,EAAE;YACzB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;SAC1B;IACH,CAAC;IAED;;;OAGG;IACI,UAAU;QACf,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,KAAK,kBAAkB,EAAE;YACtD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC/B;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,cAAc;;QACnB,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,KAAK,kBAAkB,EAAE;YACtD,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;SAC/E;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAC,IAAI,CAAC,UAAU,CAAC,eAAkC,mCAAI,OAAO,CAAC,CAAM,CAAC;IAChH,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,WAA6B,EAAE,UAAU,GAAG,EAAE;QAC1D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CACF;AAjID,0BAiIC"}
|
package/lib/Queue/Queue.d.ts
CHANGED
package/lib/Queue/Queue.js
CHANGED
|
@@ -40,6 +40,8 @@ class Queue {
|
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
42
|
this._channel = channel;
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
44
|
+
this._channel.on("delivery", this.handleReceivedMessageEvent.bind(this));
|
|
43
45
|
const callback = (err, ok) => {
|
|
44
46
|
/* istanbul ignore if */
|
|
45
47
|
if (err) {
|
|
@@ -64,6 +66,7 @@ class Queue {
|
|
|
64
66
|
});
|
|
65
67
|
})
|
|
66
68
|
.catch((err) => {
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
67
70
|
this.log.warn(err, "Channel failure, error caused during connection!");
|
|
68
71
|
});
|
|
69
72
|
});
|
|
@@ -247,6 +250,8 @@ class Queue {
|
|
|
247
250
|
else {
|
|
248
251
|
delete this.initialized; // invalidate queue
|
|
249
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));
|
|
250
255
|
this._channel.close((channelCloseError) => {
|
|
251
256
|
/* istanbul ignore if */
|
|
252
257
|
if (channelCloseError) {
|
|
@@ -284,6 +289,8 @@ class Queue {
|
|
|
284
289
|
.then(() => {
|
|
285
290
|
delete this.initialized; // invalidate queue
|
|
286
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));
|
|
287
294
|
this._channel.close((err) => {
|
|
288
295
|
/* istanbul ignore if */
|
|
289
296
|
if (err) {
|
|
@@ -324,6 +331,9 @@ class Queue {
|
|
|
324
331
|
unbind(source, pattern = "", _args = {}) {
|
|
325
332
|
return this.connection._bindings[Binding_1.Binding.id(this, source, pattern)].delete();
|
|
326
333
|
}
|
|
334
|
+
handleReceivedMessageEvent(_args) {
|
|
335
|
+
this.connection._increaseCounter("receivedMessages");
|
|
336
|
+
}
|
|
327
337
|
}
|
|
328
338
|
exports.Queue = Queue;
|
|
329
339
|
//# sourceMappingURL=Queue.js.map
|
package/lib/Queue/Queue.js.map
CHANGED
|
@@ -1 +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,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAE5E,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;QAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IArBD,qCAAqC;IACrC,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAoBD,qGAAqG;IACrG,WAAW;QACT,IAAI,CAAC,WAAW,GAAG,IAAI,OAAO,CAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnE,IAAI,CAAC,UAAU,CAAC,WAAW;iBACxB,IAAI,CAAC,GAAG,EAAE;gBACT,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,kBAAkB,EAAE,OAAO,EAAE,EAAE;oBACv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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"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AmqpProperties } from "./AmqpProperties";
|
|
2
2
|
import { Binding } from "./Binding";
|
|
3
3
|
import { Connection } from "./Connection/Connection";
|
|
4
|
+
import type { ConnectionMetrics } from "./Connection/ConnectionMetrics";
|
|
4
5
|
import type { ReconnectStrategy } from "./Connection/ReconnectStrategy";
|
|
5
6
|
import type { Topology } from "./Connection/Topology";
|
|
6
7
|
import type { DeclarationOptions as ExchangeDeclarationOptions } from "./Exchange/DeclarationOptions";
|
|
@@ -10,4 +11,4 @@ import type { LoggerFactory } from "./LoggerFactory";
|
|
|
10
11
|
import { Message } from "./Message";
|
|
11
12
|
import type { DeclarationOptions as QueueDeclarationOptions } from "./Queue/DeclarationOptions";
|
|
12
13
|
import { Queue } from "./Queue/Queue";
|
|
13
|
-
export { AmqpProperties, Binding, Connection, Exchange, ExchangeDeclarationOptions, ExchangeType, LoggerFactory, Message, Queue, QueueDeclarationOptions, ReconnectStrategy, Topology, };
|
|
14
|
+
export { AmqpProperties, Binding, Connection, ConnectionMetrics, Exchange, ExchangeDeclarationOptions, ExchangeType, LoggerFactory, Message, Queue, QueueDeclarationOptions, ReconnectStrategy, Topology, };
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,uCAAoC;
|
|
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.
|
|
3
|
+
"version": "2.6.2",
|
|
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": "
|
|
40
|
-
"@commitlint/config-conventional": "
|
|
41
|
-
"@semantic-release/changelog": "
|
|
42
|
-
"@semantic-release/git": "
|
|
43
|
-
"@types/amqplib": "0.8.
|
|
44
|
-
"@types/chai-as-promised": "7.1.
|
|
45
|
-
"@types/mocha": "
|
|
46
|
-
"@types/node": "
|
|
47
|
-
"@types/pino": "6.3.
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "
|
|
49
|
-
"@typescript-eslint/parser": "
|
|
50
|
-
"chai": "4.3.
|
|
51
|
-
"chai-as-promised": "
|
|
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.21",
|
|
47
|
+
"@types/pino": "6.3.12",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "5.12.1",
|
|
49
|
+
"@typescript-eslint/parser": "5.12.1",
|
|
50
|
+
"chai": "4.3.6",
|
|
51
|
+
"chai-as-promised": "7.1.1",
|
|
52
52
|
"del": "6.0.0",
|
|
53
|
-
"eslint": "
|
|
54
|
-
"eslint-config-prettier": "8.
|
|
55
|
-
"eslint-plugin-mocha": "
|
|
53
|
+
"eslint": "8.10.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.
|
|
58
|
-
"line-reader": "
|
|
57
|
+
"husky": "7.0.4",
|
|
58
|
+
"line-reader": "0.4.0",
|
|
59
59
|
"merge2": "1.4.1",
|
|
60
|
-
"mocha": "9.
|
|
60
|
+
"mocha": "9.2.1",
|
|
61
61
|
"nyc": "15.1.0",
|
|
62
|
-
"pino": "6.
|
|
63
|
-
"pino-pretty": "5.1
|
|
64
|
-
"prettier": "2.
|
|
65
|
-
"rimraf": "
|
|
66
|
-
"semantic-release": "
|
|
67
|
-
"source-map-support": "0.5.
|
|
68
|
-
"ts-node": "10.
|
|
69
|
-
"typescript": "4.
|
|
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"
|
package/CHANGELOG.md
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
## [2.5.1](https://github.com/droidsolutions/amqp-ts/compare/v2.5.0...v2.5.1) (2021-07-16)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* **npm:** include js and d.ts files in NPM package ([5174079](https://github.com/droidsolutions/amqp-ts/commit/51740791a5204b32bad989fef0cea6d93afe5a95))
|
|
7
|
-
|
|
8
|
-
## [2.5.1-develop.1](https://github.com/droidsolutions/amqp-ts/compare/v2.5.0...v2.5.1-develop.1) (2021-07-16)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Bug Fixes
|
|
12
|
-
|
|
13
|
-
* **npm:** include js and d.ts files in NPM package ([5174079](https://github.com/droidsolutions/amqp-ts/commit/51740791a5204b32bad989fef0cea6d93afe5a95))
|
|
14
|
-
|
|
15
|
-
# [2.5.0](https://github.com/droidsolutions/amqp-ts/compare/v2.4.2...v2.5.0) (2021-07-15)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Features
|
|
19
|
-
|
|
20
|
-
* update amqplib to 0.8.0 ([9ef47cf](https://github.com/droidsolutions/amqp-ts/commit/9ef47cf36782b99ca069dfee73eb64add2a154c7))
|
|
21
|
-
|
|
22
|
-
## [2.4.2](https://github.com/droidsolutions/amqp-ts/compare/v2.4.1...v2.4.2) (2021-05-11)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* **deps:** run npm audit fix ([5fef092](https://github.com/droidsolutions/amqp-ts/commit/5fef0925f15d35719f609b36cd24bbcabb290e04))
|
|
28
|
-
|
|
29
|
-
## [2.4.1](https://github.com/droidsolutions/amqp-ts/compare/v2.4.0...v2.4.1) (2021-03-22)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
* update typescript type for options in activateConsumer ([acfd9db](https://github.com/droidsolutions/amqp-ts/commit/acfd9dba949ca0add030ba800fa40c010dfab484))
|
|
35
|
-
|
|
36
|
-
# [2.4.0](https://github.com/droidsolutions/amqp-ts/compare/v2.3.0...v2.4.0) (2021-03-22)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### Features
|
|
40
|
-
|
|
41
|
-
* add message properties to consumer options ([6d73eb5](https://github.com/droidsolutions/amqp-ts/commit/6d73eb518144602abbfb8db20bf030076895ce9c))
|
|
42
|
-
|
|
43
|
-
# [2.3.0](https://github.com/droidsolutions/amqp-ts/compare/v2.2.1...v2.3.0) (2021-03-12)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### Features
|
|
47
|
-
|
|
48
|
-
* set Timestamp of message when not given by user ([b576a56](https://github.com/droidsolutions/amqp-ts/commit/b576a56dc273e4d6803a0bff7473bda9c4cbe3db))
|
|
49
|
-
|
|
50
|
-
## [2.2.1](https://github.com/droidsolutions/amqp-ts/compare/v2.2.0...v2.2.1) (2021-03-10)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Bug Fixes
|
|
54
|
-
|
|
55
|
-
* don't send auto reply when consumer handler does not return a value ([aa0a6e1](https://github.com/droidsolutions/amqp-ts/commit/aa0a6e1b7d2ba701f43fe6c29415f62e94aebad4))
|
|
56
|
-
|
|
57
|
-
# [2.2.0](https://github.com/droidsolutions/amqp-ts/compare/v2.1.0...v2.2.0) (2021-03-09)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### Features
|
|
61
|
-
|
|
62
|
-
* add declareQueueAsync and declareExchangeAsync ([0e52d9a](https://github.com/droidsolutions/amqp-ts/commit/0e52d9a071aafae540abc00a78b46bf51bcc9ce8))
|
|
63
|
-
|
|
64
|
-
# [2.1.0](https://github.com/droidsolutions/amqp-ts/compare/v2.0.0...v2.1.0) (2021-03-03)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### Bug Fixes
|
|
68
|
-
|
|
69
|
-
* check process.argv length before determining app name ([f7d0a18](https://github.com/droidsolutions/amqp-ts/commit/f7d0a18193e631bd3f4dfc4eb1ada889a36d8bd2)), closes [abreits/amqp-ts/#62](https://github.com/abreits/amqp-ts//issues/62)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### Features
|
|
73
|
-
|
|
74
|
-
* add ExchangeType to prevent wrong exchange type ([e80a01e](https://github.com/droidsolutions/amqp-ts/commit/e80a01e98e7b773503f24009beda3ecb1291e3ce))
|
|
75
|
-
|
|
76
|
-
# [2.0.0](https://github.com/droidsolutions/amqp-ts/compare/v1.3.2...v2.0.0) (2021-02-01)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
### Code Refactoring
|
|
80
|
-
|
|
81
|
-
* replac eunused options interface with amqplib interface ([679359c](https://github.com/droidsolutions/amqp-ts/commit/679359c2579d24b00ce3a74773353efe63632f09))
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### BREAKING CHANGES
|
|
85
|
-
|
|
86
|
-
* removes StartConsumerOptions export.
|
|
87
|
-
* Queue.activateConsumer and Exchange.activateConsumer now takes the
|
|
88
|
-
AmqpLib.Options.Consume interface
|
|
89
|
-
instead of the StartConsumerOptions. The interfaces look the same so no special actions should be
|
|
90
|
-
needed.
|
|
91
|
-
|
|
92
|
-
Also adds JSDOC comments on public queue methods and properties.
|
|
93
|
-
|
|
94
|
-
## [1.3.2](https://github.com/droidsolutions/amqp-ts/compare/v1.3.1...v1.3.2) (2020-11-20)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Bug Fixes
|
|
98
|
-
|
|
99
|
-
* export ReconnectStrategy ([c9baa02](https://github.com/droidsolutions/amqp-ts/commit/c9baa0213c3b3068fbcb925f932c682bf46bb41a))
|
|
100
|
-
|
|
101
|
-
## [1.3.1](https://github.com/droidsolutions/amqp-ts/compare/v1.3.0...v1.3.1) (2020-10-15)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### Bug Fixes
|
|
105
|
-
|
|
106
|
-
* suppress "content is not a buffer" ([284b492](https://github.com/droidsolutions/amqp-ts/commit/284b492ad4b3cd3491d809fcc01813ef50f224d2))
|
|
107
|
-
|
|
108
|
-
# [1.3.0](https://github.com/droidsolutions/amqp-ts/compare/v1.2.1...v1.3.0) (2020-09-28)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
### Features
|
|
112
|
-
|
|
113
|
-
* emit jsdoc in transpiled js ([27c5619](https://github.com/droidsolutions/amqp-ts/commit/27c561917999edddc8cbab80e0a9216d11327d85))
|
|
114
|
-
|
|
115
|
-
## [1.2.1](https://github.com/droidsolutions/amqp-ts/compare/v1.2.0...v1.2.1) (2020-09-28)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### Bug Fixes
|
|
119
|
-
|
|
120
|
-
* implement AmqpProperties for librrary consumers and add documentation ([e28d535](https://github.com/droidsolutions/amqp-ts/commit/e28d53538a722a89b6c0e7d8884506d686ffe6c3))
|
|
121
|
-
|
|
122
|
-
# [1.2.0](https://github.com/droidsolutions/amqp-ts/compare/v1.1.1...v1.2.0) (2020-09-28)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
### Features
|
|
126
|
-
|
|
127
|
-
* add generic getJsonContent method to Message ([931d40e](https://github.com/droidsolutions/amqp-ts/commit/931d40eac304e67d9c0bd649495cec301e393563))
|
|
128
|
-
|
|
129
|
-
## [1.1.1](https://github.com/droidsolutions/amqp-ts/compare/v1.1.0...v1.1.1) (2020-09-28)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
### Bug Fixes
|
|
133
|
-
|
|
134
|
-
* re-export Amqp property type ([2b8b887](https://github.com/droidsolutions/amqp-ts/commit/2b8b887e45b69dcc6da65ef15e944b919fe26022))
|
|
135
|
-
|
|
136
|
-
# [1.1.0](https://github.com/droidsolutions/amqp-ts/compare/v1.0.3...v1.1.0) (2020-09-28)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
### Features
|
|
140
|
-
|
|
141
|
-
* set type of Message properties ([b7c965c](https://github.com/droidsolutions/amqp-ts/commit/b7c965c64e24fe48ff34010f1089544a8d9e07dd))
|
|
142
|
-
* **deps:** update amqplib to 0.6.0 ([8106b1c](https://github.com/droidsolutions/amqp-ts/commit/8106b1c0a2c8bd0dd2afaa3a34156d0c5dc224e7))
|
|
143
|
-
|
|
144
|
-
## [1.0.3](https://github.com/droidsolutions/amqp-ts/compare/v1.0.2...v1.0.3) (2020-05-25)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
### Bug Fixes
|
|
148
|
-
|
|
149
|
-
* update amqlib to 0.5.6 ([e254676](https://github.com/droidsolutions/amqp-ts/commit/e254676df29b9c8ce7e369bf58ba8c356f99d4bc))
|
|
150
|
-
|
|
151
|
-
## [1.0.2](https://github.com/droidsolutions/amqp-ts/compare/v1.0.1...v1.0.2) (2020-04-15)
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
### Bug Fixes
|
|
155
|
-
|
|
156
|
-
* make message content public again ([8f19be1](https://github.com/droidsolutions/amqp-ts/commit/8f19be18ea0e591308ddfd72dcc5cc955133fa03))
|
|
157
|
-
* make properties of Message public again ([7b3b6ef](https://github.com/droidsolutions/amqp-ts/commit/7b3b6efb24944eefa55c447c2573985bbfc4c1e2))
|
|
158
|
-
* make type constructor arg for Exchange optional again ([6cbeae5](https://github.com/droidsolutions/amqp-ts/commit/6cbeae5296b4befa907352ff8e8dde77fb254d40))
|
|
159
|
-
|
|
160
|
-
## [1.0.1](https://github.com/droidsolutions/amqp-ts/compare/v1.0.0...v1.0.1) (2020-04-14)
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
### Bug Fixes
|
|
164
|
-
|
|
165
|
-
* add publishConfig to mark to package public ([a97ba95](https://github.com/droidsolutions/amqp-ts/commit/a97ba95b18dc005af88af4e3c60ccf599bb4e867))
|
|
166
|
-
|
|
167
|
-
# 1.0.0 (2020-04-14)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
### Features
|
|
171
|
-
|
|
172
|
-
* remove winston and add logger factory ([75c5cd1](https://github.com/droidsolutions/amqp-ts/commit/75c5cd131d0c5458e107c62a95d3c344e91bcf6e))
|
|
173
|
-
* update amqplib to 0.5.5 ([ffc3d42](https://github.com/droidsolutions/amqp-ts/commit/ffc3d42583a965c4e2e6d313692054c965c3cc95))
|