@autofleet/rabbit 3.2.19-beta.3 → 3.2.19-beta.5
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 +3 -2
- package/package.json +1 -1
- package/src/index.ts +3 -2
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ const consts_1 = require("./lib/consts");
|
|
|
19
19
|
const types_1 = require("./lib/types");
|
|
20
20
|
// const debug = nodeDebug('af-rabbitmq')
|
|
21
21
|
const debug = logger_1.default.debug.bind(logger_1.default);
|
|
22
|
-
const PUBLISH_TIMEOUT = 1000 *
|
|
22
|
+
const PUBLISH_TIMEOUT = 1000 * 10;
|
|
23
23
|
const HEARTBEAT = '60';
|
|
24
24
|
class RabbitMq {
|
|
25
25
|
static parseMsg(msg) {
|
|
@@ -494,7 +494,8 @@ class RabbitMq {
|
|
|
494
494
|
return res;
|
|
495
495
|
}
|
|
496
496
|
catch (e) {
|
|
497
|
-
|
|
497
|
+
const isConnected = await this.isConnected();
|
|
498
|
+
logger_1.default.error(`rabbit sendToQueue: failed to send to queue ${queue}, isConnected: ${isConnected}`, { e });
|
|
498
499
|
throw e;
|
|
499
500
|
}
|
|
500
501
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
// const debug = nodeDebug('af-rabbitmq')
|
|
42
42
|
const debug = logger.debug.bind(logger);
|
|
43
43
|
|
|
44
|
-
const PUBLISH_TIMEOUT = 1000 *
|
|
44
|
+
const PUBLISH_TIMEOUT = 1000 * 10;
|
|
45
45
|
|
|
46
46
|
export interface IAfRabbitMq {
|
|
47
47
|
ack: any;
|
|
@@ -676,7 +676,8 @@ class RabbitMq implements IAfRabbitMq {
|
|
|
676
676
|
debug(`rabbit: sending to queue ${queue}`, { res });
|
|
677
677
|
return res;
|
|
678
678
|
} catch (e) {
|
|
679
|
-
|
|
679
|
+
const isConnected = await this.isConnected();
|
|
680
|
+
logger.error(`rabbit sendToQueue: failed to send to queue ${queue}, isConnected: ${isConnected}`, { e });
|
|
680
681
|
throw e;
|
|
681
682
|
}
|
|
682
683
|
}
|