@autofleet/rabbit 2.1.9 → 2.1.11
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.d.ts +3 -3
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,13 +50,13 @@ declare class RabbitMq implements IAfRabbitMq {
|
|
|
50
50
|
getNewChannel(): Promise<ChannelWrapper>;
|
|
51
51
|
assertChannel(): Promise<ChannelWrapper>;
|
|
52
52
|
assertExchange(exchangeName: string, options?: any): Promise<any>;
|
|
53
|
-
getQueueLength(queue: string): Promise<
|
|
54
|
-
bindQueue(queue: string, exchange: string): Promise<
|
|
53
|
+
getQueueLength(queue: string): Promise<import("amqplib").Replies.AssertQueue>;
|
|
54
|
+
bindQueue(queue: string, exchange: string): Promise<void>;
|
|
55
55
|
assertQueue(queue: string, options?: Options.AssertQueue): Promise<void>;
|
|
56
56
|
consume(queue: string, callback: (msg: any, ack: Function, nack: Function) => any, options?: any): Promise<void>;
|
|
57
57
|
consumeFromExchange(queue: string, exchange: string, callback: (msg: any, ack: Function, nack: Function) => any, options?: any): Promise<void>;
|
|
58
58
|
publish(exchange: string, content: any, customHeaders?: any): Promise<unknown>;
|
|
59
|
-
sendToQueue(queue: string, content: any, options?: any, customHeaders?: any): Promise<
|
|
59
|
+
sendToQueue(queue: string, content: any, options?: any, customHeaders?: any): Promise<boolean>;
|
|
60
60
|
isConnected(): Promise<boolean>;
|
|
61
61
|
}
|
|
62
62
|
export default RabbitMq;
|
package/dist/index.js
CHANGED
|
@@ -233,7 +233,7 @@ class RabbitMq {
|
|
|
233
233
|
yield callback(parsedMessage, this.ack(channel, true), this.nack(channel, queue, optionsWithDefaults, { messageTtl: deadMessageTtl }));
|
|
234
234
|
}
|
|
235
235
|
catch (e) {
|
|
236
|
-
yield this.nack(channel, queue, optionsWithDefaults, { messageTtl: deadMessageTtl });
|
|
236
|
+
yield this.nack(channel, queue, optionsWithDefaults, { messageTtl: deadMessageTtl })(msg);
|
|
237
237
|
}
|
|
238
238
|
})),
|
|
239
239
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/rabbit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@types/amqp-connection-manager": "^2.0.10",
|
|
20
20
|
"@types/amqplib": "^0.5.16",
|
|
21
21
|
"@types/uuid": "^8.3.3",
|
|
22
|
-
"amqp-connection-manager": "^3.
|
|
22
|
+
"amqp-connection-manager": "^3.7.0",
|
|
23
23
|
"amqplib": "^0.6.0",
|
|
24
24
|
"bluebird": "^3.7.2",
|
|
25
25
|
"moment": "^2.29.1",
|
package/src/index.ts
CHANGED
|
@@ -266,7 +266,7 @@ class RabbitMq implements IAfRabbitMq {
|
|
|
266
266
|
this.nack(channel, queue, optionsWithDefaults, { messageTtl: deadMessageTtl }),
|
|
267
267
|
);
|
|
268
268
|
} catch (e) {
|
|
269
|
-
await this.nack(channel, queue, optionsWithDefaults, { messageTtl: deadMessageTtl });
|
|
269
|
+
await this.nack(channel, queue, optionsWithDefaults, { messageTtl: deadMessageTtl })(msg);
|
|
270
270
|
}
|
|
271
271
|
},
|
|
272
272
|
),
|