@onlineapps/conn-infra-mq 1.1.26 → 1.1.28
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
|
@@ -201,6 +201,9 @@ class RabbitMQClient extends EventEmitter {
|
|
|
201
201
|
const prefetch = options.prefetch !== undefined ? options.prefetch : this._config.prefetch;
|
|
202
202
|
const noAck = options.noAck !== undefined ? options.noAck : this._config.noAck;
|
|
203
203
|
|
|
204
|
+
console.log(`[RabbitMQClient] DEBUG: consume() called for queue: ${queue}`);
|
|
205
|
+
console.log(`[RabbitMQClient] DEBUG: Channel state: _channel closed=${this._channel ? this._channel.closed : 'N/A'}, _queueChannel closed=${this._queueChannel ? this._queueChannel.closed : 'N/A'}`);
|
|
206
|
+
|
|
204
207
|
try {
|
|
205
208
|
// Skip assertQueue for reply queues (they're already created with specific settings)
|
|
206
209
|
// Reply queues start with 'rpc.reply.' and are created as non-durable
|
|
@@ -212,10 +215,13 @@ class RabbitMQClient extends EventEmitter {
|
|
|
212
215
|
// Infrastructure queue - should already exist, created by infrastructure initialization
|
|
213
216
|
// Use queueChannel (regular channel) for queue operations to avoid RPC reply queue issues
|
|
214
217
|
// Only check if it exists, don't try to create or assert with arguments
|
|
218
|
+
console.log(`[RabbitMQClient] DEBUG: Infrastructure queue ${queue}, checking existence...`);
|
|
215
219
|
try {
|
|
216
220
|
await this._queueChannel.checkQueue(queue);
|
|
221
|
+
console.log(`[RabbitMQClient] DEBUG: Infrastructure queue ${queue} exists`);
|
|
217
222
|
// Queue exists - proceed to consume
|
|
218
223
|
} catch (checkErr) {
|
|
224
|
+
console.error(`[RabbitMQClient] DEBUG: checkQueue failed for infrastructure queue ${queue}:`, checkErr.message);
|
|
219
225
|
if (checkErr.code === 404) {
|
|
220
226
|
// Queue doesn't exist - infrastructure problem
|
|
221
227
|
throw new Error(`Infrastructure queue '${queue}' not found. Queue should be created during infrastructure initialization.`);
|
|
@@ -229,6 +235,7 @@ class RabbitMQClient extends EventEmitter {
|
|
|
229
235
|
// If queue doesn't exist, that's a programming error (setupServiceQueues() should have created it)
|
|
230
236
|
// Just proceed to consume - if queue doesn't exist, consume will fail with a clear error
|
|
231
237
|
// This avoids channel closure from checkQueue() on non-existent queues
|
|
238
|
+
console.log(`[RabbitMQClient] DEBUG: Business queue ${queue}, skipping checkQueue() - queue should already exist`);
|
|
232
239
|
}
|
|
233
240
|
}
|
|
234
241
|
// Set prefetch if provided
|