@onlineapps/service-wrapper 2.0.28 → 2.0.29
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/package.json +1 -1
- package/src/ServiceWrapper.js +11 -5
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -265,11 +265,17 @@ class ServiceWrapper {
|
|
|
265
265
|
if (this.config.wrapper?.mq?.initInfrastructureQueues !== false) {
|
|
266
266
|
try {
|
|
267
267
|
const { initInfrastructureQueues } = require('@onlineapps/conn-infra-mq').utils || {};
|
|
268
|
-
if (initInfrastructureQueues
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
268
|
+
if (initInfrastructureQueues) {
|
|
269
|
+
// Get channel from transport (RabbitMQClient has channel getter)
|
|
270
|
+
const channel = this.mqClient._transport?.channel || this.mqClient._transport?._channel;
|
|
271
|
+
if (channel) {
|
|
272
|
+
await initInfrastructureQueues(channel, {
|
|
273
|
+
logger: this.logger || console
|
|
274
|
+
});
|
|
275
|
+
console.log('✓ Infrastructure queues initialized');
|
|
276
|
+
} else {
|
|
277
|
+
console.warn('⚠ Could not get channel from MQ transport');
|
|
278
|
+
}
|
|
273
279
|
}
|
|
274
280
|
} catch (error) {
|
|
275
281
|
// If tool not available or fails, log warning but continue
|