@onlineapps/conn-infra-mq 1.1.69 → 1.1.70

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.69",
3
+ "version": "1.1.70",
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": {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "homepage": "https://github.com/onlineapps/connector-mq-client#readme",
44
44
  "dependencies": {
45
- "@onlineapps/mq-client-core": "1.0.82",
45
+ "@onlineapps/mq-client-core": "1.0.83",
46
46
  "ajv": "^8.11.0",
47
47
  "amqplib": "^0.10.3",
48
48
  "lodash.merge": "^4.6.2"
@@ -86,8 +86,11 @@ class ConnectorMQClient extends BaseClient {
86
86
  this.retry = new RetryHandler(this, config);
87
87
  this.forkJoin = new ForkJoinHandler(this, this.queues, config);
88
88
 
89
- // Service identification
90
- this.serviceName = config.serviceName || 'unknown';
89
+ // Service identification — required for queue naming, health, and workflow context
90
+ if (!config.serviceName) {
91
+ throw new Error('[MQClient] serviceName is required for service identification');
92
+ }
93
+ this.serviceName = config.serviceName;
91
94
 
92
95
  // Track initialization state
93
96
  this._initialized = false;
@@ -8,6 +8,7 @@ class ForkJoinHandler {
8
8
  constructor(mqClient, queueManager, config = {}) {
9
9
  this.client = mqClient;
10
10
  this.queueManager = queueManager;
11
+ // INTENTIONAL FALLBACK: MQ operational defaults — see docs/standards/FALLBACKS_INVENTORY.md §5.3
11
12
  this.config = {
12
13
  defaultTimeout: config.defaultTimeout || 30000,
13
14
  accumulatorPrefix: config.accumulatorPrefix || 'fork',
@@ -12,10 +12,11 @@ const queueConfig = require('../config/queueConfig');
12
12
  class QueueManager {
13
13
  constructor(mqClient, config = {}) {
14
14
  this.client = mqClient;
15
+ // INTENTIONAL FALLBACK: MQ operational defaults — see docs/standards/FALLBACKS_INVENTORY.md §5.3
15
16
  this.config = {
16
17
  defaultTTL: config.defaultTTL || 30000,
17
18
  dlxExchange: config.dlxExchange || 'dlx',
18
- autoDeleteTimeout: config.autoDeleteTimeout || 300000, // 5 minutes
19
+ autoDeleteTimeout: config.autoDeleteTimeout || 300000,
19
20
  maxRetries: config.maxRetries || 3,
20
21
  ...config
21
22
  };
@@ -7,6 +7,7 @@
7
7
  class RetryHandler {
8
8
  constructor(mqClient, config = {}) {
9
9
  this.client = mqClient;
10
+ // INTENTIONAL FALLBACK: MQ operational defaults — see docs/standards/FALLBACKS_INVENTORY.md §5.3
10
11
  this.config = {
11
12
  maxRetries: config.maxRetries || 3,
12
13
  initialDelay: config.initialDelay || 1000,
@@ -7,10 +7,11 @@
7
7
  class WorkflowRouter {
8
8
  constructor(mqClient, config = {}) {
9
9
  this.client = mqClient;
10
+ // INTENTIONAL FALLBACK: MQ operational defaults — see docs/standards/FALLBACKS_INVENTORY.md §5.3
10
11
  this.config = {
11
12
  workflowInitQueue: config.workflowInitQueue || 'workflow.init',
12
13
  workflowCompletedQueue: config.workflowCompletedQueue || 'workflow.completed',
13
- serviceName: config.serviceName || 'unknown',
14
+ serviceName: config.serviceName,
14
15
  ...config
15
16
  };
16
17
  }