@rxdi/rabbitmq-pubsub 0.7.224 → 0.7.226
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/common.d.ts +3 -0
- package/dist/subscriber.d.ts +3 -1
- package/dist/subscriber.js +3 -3
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
package/dist/subscriber.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare class RabbitMqSubscriber {
|
|
|
14
14
|
private subscribeToChannel;
|
|
15
15
|
protected getMessageObject<T>(message: Message): T;
|
|
16
16
|
protected getChannelSetup(channel: Channel, queueConfig: IQueueNameConfig): Promise<string>;
|
|
17
|
-
protected getQueueSettings(
|
|
17
|
+
protected getQueueSettings(args?: {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}): Options.AssertQueue;
|
|
18
20
|
protected getDLSettings(): Options.AssertQueue;
|
|
19
21
|
}
|
package/dist/subscriber.js
CHANGED
|
@@ -52,7 +52,6 @@ class RabbitMqSubscriber {
|
|
|
52
52
|
catch (err) {
|
|
53
53
|
this.logger.error(err, "message processing failed from queue '%j' (%j)", queueConfig, msg);
|
|
54
54
|
channel.nack(message, false, false);
|
|
55
|
-
throw err;
|
|
56
55
|
}
|
|
57
56
|
}));
|
|
58
57
|
this.logger.trace("subscribed to queue '%s' (%s)", queueConfig.name, opts.consumerTag);
|
|
@@ -69,15 +68,16 @@ class RabbitMqSubscriber {
|
|
|
69
68
|
getChannelSetup(channel, queueConfig) {
|
|
70
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
70
|
yield channel.assertExchange(queueConfig.dlx, "fanout", this.getDLSettings());
|
|
72
|
-
let result = yield channel.assertQueue(queueConfig.strictName ? queueConfig.name : queueConfig.dlq, this.getQueueSettings());
|
|
71
|
+
let result = yield channel.assertQueue(queueConfig.strictName ? queueConfig.name : queueConfig.dlq, this.getQueueSettings(queueConfig.arguments));
|
|
73
72
|
yield channel.bindQueue(result.queue, queueConfig.dlx, "");
|
|
74
73
|
return result.queue;
|
|
75
74
|
});
|
|
76
75
|
}
|
|
77
|
-
getQueueSettings() {
|
|
76
|
+
getQueueSettings(args) {
|
|
78
77
|
return {
|
|
79
78
|
exclusive: false,
|
|
80
79
|
autoDelete: true,
|
|
80
|
+
arguments: args,
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
getDLSettings() {
|