@onlineapps/conn-infra-mq 1.1.8 → 1.1.9
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/ConnectorMQClient.js +9 -1
package/package.json
CHANGED
package/src/ConnectorMQClient.js
CHANGED
|
@@ -92,12 +92,20 @@ class ConnectorMQClient extends BaseClient {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Setup service queues if service name provided
|
|
95
|
-
|
|
95
|
+
const shouldAutoSetup = this._config.autoSetupServiceQueues !== false;
|
|
96
|
+
|
|
97
|
+
if (this.serviceName !== 'unknown' && shouldAutoSetup) {
|
|
96
98
|
try {
|
|
97
99
|
await this.queues.setupServiceQueues(this.serviceName);
|
|
98
100
|
} catch (error) {
|
|
99
101
|
console.warn(`Failed to setup service queues: ${error.message}`);
|
|
100
102
|
}
|
|
103
|
+
} else if (this.serviceName !== 'unknown' && !shouldAutoSetup) {
|
|
104
|
+
if (this._config.logger && typeof this._config.logger.info === 'function') {
|
|
105
|
+
this._config.logger.info(`[ConnectorMQClient] Auto queue setup disabled for ${this.serviceName} (will be created explicitly)`);
|
|
106
|
+
} else {
|
|
107
|
+
console.log(`[ConnectorMQClient] Auto queue setup disabled for ${this.serviceName} (will be created explicitly)`);
|
|
108
|
+
}
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
this._initialized = true;
|