@autofleet/rabbit 3.4.0-beta.2 → 3.4.0-beta.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/dist/index.js CHANGED
@@ -983,6 +983,12 @@ class RabbitMq {
983
983
  return queue;
984
984
  }
985
985
  async assertChannelOld({ force = false, connection }) {
986
+ if (connection === this.oldPublishConnection) {
987
+ debug('rabbit: assertChannelOld publish', { force, promiseSetup: this.oldPublishChannelSetupPromise });
988
+ }
989
+ else if (connection === this.oldConsumeConnection) {
990
+ debug('rabbit: assertChannelOld consume', { force, promiseSetup: this.oldPublishChannelSetupPromise });
991
+ }
986
992
  if (!this.oldPublishChannelSetupPromise) {
987
993
  this.oldPublishChannelSetupPromise = new Promise(async (resolve, reject) => {
988
994
  if (this.oldPublishChannel && !force) {
@@ -990,6 +996,12 @@ class RabbitMq {
990
996
  }
991
997
  try {
992
998
  const channel = await this.getNewChannelOld({ connection });
999
+ if (connection === this.oldPublishConnection) {
1000
+ debug('rabbit: old new channel got publish', { force, channel });
1001
+ }
1002
+ else if (connection === this.oldConsumeConnection) {
1003
+ debug('rabbit: old new channel got consume', { force, channel });
1004
+ }
993
1005
  channel.on('error', (err) => {
994
1006
  logger_1.default.error('rabbit: channel error', { err });
995
1007
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/rabbit",
3
- "version": "3.4.0-beta.2",
3
+ "version": "3.4.0-beta.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
package/src/index.ts CHANGED
@@ -1269,6 +1269,11 @@ class RabbitMq implements IAfRabbitMq {
1269
1269
  }
1270
1270
 
1271
1271
  async assertChannelOld({ force = false, connection }: assertChannelOpts): Promise<ChannelWrapper> {
1272
+ if (connection === this.oldPublishConnection) {
1273
+ debug('rabbit: assertChannelOld publish', { force, promiseSetup: this.oldPublishChannelSetupPromise });
1274
+ } else if (connection === this.oldConsumeConnection) {
1275
+ debug('rabbit: assertChannelOld consume', { force, promiseSetup: this.oldPublishChannelSetupPromise });
1276
+ }
1272
1277
  if (!this.oldPublishChannelSetupPromise) {
1273
1278
  this.oldPublishChannelSetupPromise = new Promise<ChannelWrapper>(async (resolve, reject) => {
1274
1279
  if (this.oldPublishChannel && !force) {
@@ -1277,6 +1282,11 @@ class RabbitMq implements IAfRabbitMq {
1277
1282
 
1278
1283
  try {
1279
1284
  const channel = await this.getNewChannelOld({ connection });
1285
+ if (connection === this.oldPublishConnection) {
1286
+ debug('rabbit: old new channel got publish', { force, channel });
1287
+ } else if (connection === this.oldConsumeConnection) {
1288
+ debug('rabbit: old new channel got consume', { force, channel });
1289
+ }
1280
1290
  channel.on('error', (err) => {
1281
1291
  logger.error('rabbit: channel error', { err });
1282
1292
  });