@seidor-cloud-produtos/orbit-backend-lib 2.0.126 → 2.0.130
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.
|
@@ -20,7 +20,6 @@ class AmqpQueue {
|
|
|
20
20
|
static instance;
|
|
21
21
|
vHost;
|
|
22
22
|
connection;
|
|
23
|
-
isReconnecting = false;
|
|
24
23
|
messagesInMemory = [];
|
|
25
24
|
channels = new Map();
|
|
26
25
|
socketOptions;
|
|
@@ -348,16 +347,11 @@ class AmqpQueue {
|
|
|
348
347
|
* reconectar, reativa consumidores e reenvia mensagens em memória.
|
|
349
348
|
*/
|
|
350
349
|
async treatReconnection(vHost) {
|
|
351
|
-
if (this.isReconnecting) {
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
this.isReconnecting = true;
|
|
355
350
|
this.logger.info('⛔ Connection Error!!');
|
|
356
351
|
this.logger.info(`🔄 Try connection to the vHost ${vHost}`);
|
|
357
352
|
await this.connect(vHost);
|
|
358
353
|
await this.reconnectionChannels();
|
|
359
354
|
await this.publishMessagesOfMemory();
|
|
360
|
-
this.isReconnecting = false;
|
|
361
355
|
}
|
|
362
356
|
/**
|
|
363
357
|
* Reinscreve todos os consumidores registrados anteriormente.
|