@onlineapps/conn-infra-mq 1.1.2 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-infra-mq",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A promise-based, broker-agnostic client for sending and receiving messages via RabbitMQ",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -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
- // Ensure queue exists
158
- await this._channel.assertQueue(queue, { durable });
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);