@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-infra-mq",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "A promise-based, broker-agnostic client for sending and receiving messages via RabbitMQ",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -92,12 +92,20 @@ class ConnectorMQClient extends BaseClient {
92
92
  }
93
93
 
94
94
  // Setup service queues if service name provided
95
- if (this.serviceName !== 'unknown') {
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;