@autofleet/rabbit 3.4.0-beta.12 → 3.4.0-beta.13

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/dist/index.js CHANGED
@@ -857,7 +857,12 @@ class RabbitMq {
857
857
  if (!localConnection) {
858
858
  throw new Error(`rabbit: couldnt get connection for new channel ${name}`);
859
859
  }
860
- debug('rabbit: getNewChannelOld', { localConnection });
860
+ if (connection === this.oldPublishConnection) {
861
+ debug('rabbit: getNewChannelOld publish', { localConnection });
862
+ }
863
+ else if (connection === this.oldConsumeConnection) {
864
+ debug('rabbit: getNewChannelOld consume', { localConnection });
865
+ }
861
866
  const channel = localConnection?.createChannel({ ...options });
862
867
  (0, events_1.once)(channel, 'close').then((args) => {
863
868
  logger_1.default.error(`rabbit: channel ${name} closed`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/rabbit",
3
- "version": "3.4.0-beta.12",
3
+ "version": "3.4.0-beta.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
package/src/index.ts CHANGED
@@ -415,6 +415,7 @@ class RabbitMq implements IAfRabbitMq {
415
415
  connectionFailedEventName,
416
416
  blockReconnect,
417
417
  } = connection;
418
+
418
419
  if (connection === this.publishConnection) {
419
420
  debug('rabbit: getConnection publish', { connectionLocal, creatingConnection, blockReconnect });
420
421
  } else if (connection === this.consumeConnection) {
@@ -1124,8 +1125,11 @@ class RabbitMq implements IAfRabbitMq {
1124
1125
  if (!localConnection) {
1125
1126
  throw new Error(`rabbit: couldnt get connection for new channel ${name}`);
1126
1127
  }
1127
-
1128
- debug('rabbit: getNewChannelOld', { localConnection });
1128
+ if (connection === this.oldPublishConnection) {
1129
+ debug('rabbit: getNewChannelOld publish', { localConnection });
1130
+ } else if (connection === this.oldConsumeConnection) {
1131
+ debug('rabbit: getNewChannelOld consume', { localConnection });
1132
+ }
1129
1133
  const channel = localConnection?.createChannel({ ...options });
1130
1134
  once(channel, 'close').then((args) => {
1131
1135
  logger.error(`rabbit: channel ${name} closed`);