@onlineapps/mq-client-core 1.0.38 → 1.0.39

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/mq-client-core",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "Core MQ client library for RabbitMQ - shared by infrastructure services and connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1037,11 +1037,15 @@ class RabbitMQClient extends EventEmitter {
1037
1037
  // Jasný, hlasitý signál pro infra služby – fronta chybí, je to programátorská chyba
1038
1038
  throw new QueueNotFoundError(queue, true, checkErr);
1039
1039
  }
1040
- // For non-infrastructure queues, allow auto-creation with default options
1041
- const queueOptions = options.queueOptions || { durable: this._config.durable };
1042
- console.warn(`[RabbitMQClient] [mq-client-core] [PUBLISH] Auto-creating non-infrastructure queue ${queue} with default options (no TTL). This should be avoided for production.`);
1043
- this._trackChannelOperation(this._queueChannel, `assertQueue ${queue}`);
1044
- await this._queueChannel.assertQueue(queue, queueOptions);
1040
+ // For non-infrastructure queues, allow auto-creation with default options
1041
+ const queueOptions = options.queueOptions || { durable: this._config.durable };
1042
+ console.warn(`[RabbitMQClient] [mq-client-core] [PUBLISH] Auto-creating non-infrastructure queue ${queue} with default options (no TTL). This should be avoided for production.`);
1043
+ // Channel could have been nulled out by close handlers; ensure it's available
1044
+ if (!this._queueChannel) {
1045
+ await this._ensureQueueChannel();
1046
+ }
1047
+ this._trackChannelOperation(this._queueChannel, `assertQueue ${queue}`);
1048
+ await this._queueChannel.assertQueue(queue, queueOptions);
1045
1049
  } else {
1046
1050
  // Other error - rethrow
1047
1051
  throw checkErr;