@onlineapps/conn-infra-mq 1.1.1 → 1.1.3
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/package.json
CHANGED
package/src/layers/RPCHandler.js
CHANGED
|
@@ -149,13 +149,17 @@ class RabbitMQClient extends EventEmitter {
|
|
|
149
149
|
throw new Error('Cannot consume: channel is not initialized');
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
const durable = this._config.durable;
|
|
152
|
+
const durable = options.durable !== undefined ? options.durable : this._config.durable;
|
|
153
153
|
const prefetch = options.prefetch !== undefined ? options.prefetch : this._config.prefetch;
|
|
154
154
|
const noAck = options.noAck !== undefined ? options.noAck : this._config.noAck;
|
|
155
155
|
|
|
156
156
|
try {
|
|
157
|
-
//
|
|
158
|
-
|
|
157
|
+
// Skip assertQueue for reply queues (they're already created with specific settings)
|
|
158
|
+
// Reply queues start with 'rpc.reply.' and are created as non-durable
|
|
159
|
+
if (!queue.startsWith('rpc.reply.')) {
|
|
160
|
+
// Ensure queue exists
|
|
161
|
+
await this._channel.assertQueue(queue, { durable });
|
|
162
|
+
}
|
|
159
163
|
// Set prefetch if provided
|
|
160
164
|
if (typeof prefetch === 'number') {
|
|
161
165
|
this._channel.prefetch(prefetch);
|