@onlineapps/conn-infra-mq 1.1.24 → 1.1.25
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 +1 -1
- package/src/layers/QueueManager.js +4 -10
package/package.json
CHANGED
|
@@ -311,18 +311,12 @@ class QueueManager {
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
// If 406 PRECONDITION-FAILED, queue exists with different args - use it as-is
|
|
314
|
+
// CRITICAL: Do NOT use checkQueue() here - it closes channel on 404!
|
|
315
|
+
// If assertQueue() returned 406, queue exists (just with different args) - that's OK
|
|
314
316
|
if (assertErr.code === 406) {
|
|
315
317
|
console.warn(`[QueueManager] Queue ${queueName} exists with different arguments, using as-is:`, assertErr.message);
|
|
316
|
-
//
|
|
317
|
-
|
|
318
|
-
throw new Error(`Channel closed after 406 error for ${queueName}`);
|
|
319
|
-
}
|
|
320
|
-
try {
|
|
321
|
-
await channel.checkQueue(queueName);
|
|
322
|
-
queues[queueInfo.type] = queueName;
|
|
323
|
-
} catch (checkErr) {
|
|
324
|
-
throw new Error(`Failed to verify existing queue ${queueName}: ${checkErr.message}`);
|
|
325
|
-
}
|
|
318
|
+
// Queue exists (just with different args) - accept it
|
|
319
|
+
queues[queueInfo.type] = queueName;
|
|
326
320
|
} else {
|
|
327
321
|
// Other error - critical, cannot continue
|
|
328
322
|
throw new Error(`Failed to create business queue ${queueName}: ${assertErr.message}`);
|