@platform-x/hep-message-broker-client 1.1.14 → 1.1.15
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.
|
@@ -52,7 +52,7 @@ const config_1 = __importDefault(require("../../config"));
|
|
|
52
52
|
const ConfigManager_1 = __importDefault(require("../../config/ConfigManager"));
|
|
53
53
|
const logger_1 = require("../../Util/logger");
|
|
54
54
|
const constants_1 = require("../../Util/constants");
|
|
55
|
-
|
|
55
|
+
const __1 = require("../..");
|
|
56
56
|
const { RABBITMQ } = config_1.default;
|
|
57
57
|
let configManager = ConfigManager_1.default.getInstance();
|
|
58
58
|
let maxRetries = RABBITMQ.MAX_RETRIES;
|
|
@@ -152,10 +152,10 @@ class MessageBroker {
|
|
|
152
152
|
try {
|
|
153
153
|
logger_1.Logger.info('Attempting to connect to RabbitMQ', 'createConnection');
|
|
154
154
|
configManager.loadConfig(RABBITMQ === null || RABBITMQ === void 0 ? void 0 : RABBITMQ.CONFIG_PATH);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
console.log(
|
|
158
|
-
const url = `amqp://${RABBITMQ.USER}:${RABBITMQ.PASS}@${RABBITMQ.HOST}:${RABBITMQ.PORT}`;
|
|
155
|
+
const secret = yield (0, __1.getIAMSecrets)();
|
|
156
|
+
let url = `amqp://${secret === null || secret === void 0 ? void 0 : secret[constants_1.SECRET_KEYS.RABBITMQ_USER]}:${secret === null || secret === void 0 ? void 0 : secret[constants_1.SECRET_KEYS.RABBITMQ_PASS]}@${RABBITMQ === null || RABBITMQ === void 0 ? void 0 : RABBITMQ.HOST}`;
|
|
157
|
+
// console.log(SECRET_KEYS.RABBITMQ_USER, SECRET_KEYS.RABBITMQ_PASS);
|
|
158
|
+
// const url = `amqp://${RABBITMQ.USER}:${RABBITMQ.PASS}@${RABBITMQ.HOST}:${RABBITMQ.PORT}`;
|
|
159
159
|
this.connection = yield amqp.connect(url, { heartbeat: RABBITMQ.HEARTBEAT });
|
|
160
160
|
this.channel = yield this.connection.createConfirmChannel();
|
|
161
161
|
this.connectionEventHandler(); // Event handlers for connection 'error' and 'close'
|