@palmetto/pubsub 3.3.1 → 3.4.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmqpConnectionManagerOptions } from "amqp-connection-manager";
|
|
1
|
+
import { AmqpConnectionManagerOptions, Options } from "amqp-connection-manager";
|
|
2
2
|
import { MessageContext, PubSubConfiguration } from "../interfaces.js";
|
|
3
3
|
import { RABBITMQ_TRANSPORT } from "./connection.js";
|
|
4
4
|
export interface RabbitMqConnectionConfig {
|
|
@@ -52,6 +52,10 @@ export interface RabbitQueueExchangeConfigurationBase extends PubSubConfiguratio
|
|
|
52
52
|
* This is useful for topic exchanges where multiple queues exist for different subscribers, but you want to publish to only one of those queues.
|
|
53
53
|
*/
|
|
54
54
|
publishToSpecificQueue?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Provide consumer options for your subscriber
|
|
57
|
+
*/
|
|
58
|
+
consumerOptions?: Options.Consume;
|
|
55
59
|
}
|
|
56
60
|
export interface RabbitQueueExchangeConfigurationTopicExchange extends RabbitQueueExchangeConfigurationBase {
|
|
57
61
|
/**
|
|
@@ -174,7 +174,7 @@ class RabbitMqSubscriber {
|
|
|
174
174
|
if (m) {
|
|
175
175
|
void onRabbitMessage(m);
|
|
176
176
|
}
|
|
177
|
-
});
|
|
177
|
+
}, subscribedMessage.config.consumerOptions);
|
|
178
178
|
channel.on("error", (err) => {
|
|
179
179
|
var _a, _b;
|
|
180
180
|
(_b = (_a = this.logger).debug) === null || _b === void 0 ? void 0 : _b.call(_a, `RabbitMQ consumer error for ${queueName}: ${err}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@palmetto/pubsub",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/palmetto/galaxy"
|
|
@@ -56,5 +56,19 @@
|
|
|
56
56
|
"amqplib": "^0.10.8",
|
|
57
57
|
"bullmq": "^5.70.2",
|
|
58
58
|
"zod": "^4.1"
|
|
59
|
+
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"@google-cloud/pubsub": {
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
64
|
+
"amqp-connection-manager": {
|
|
65
|
+
"optional": true
|
|
66
|
+
},
|
|
67
|
+
"amqplib": {
|
|
68
|
+
"optional": true
|
|
69
|
+
},
|
|
70
|
+
"bullmq": {
|
|
71
|
+
"optional": true
|
|
72
|
+
}
|
|
59
73
|
}
|
|
60
74
|
}
|