@onlineapps/mq-client-core 1.0.60 → 1.0.61

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/README.md CHANGED
@@ -29,6 +29,7 @@ const mqClient = new BaseClient({
29
29
 
30
30
  await mqClient.connect();
31
31
  await mqClient.publish('workflow.init', { workflowId: '123', data: '...' });
32
+ await mqClient.publish('workflow.control', { workflowId: '123', data: '...' });
32
33
  ```
33
34
 
34
35
  ### Configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/mq-client-core",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "Core MQ client library for RabbitMQ - shared by infrastructure services and connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -42,6 +42,27 @@ module.exports = {
42
42
  }
43
43
  },
44
44
 
45
+ /**
46
+ * workflow.control - Shared queue for service-agnostic control-flow steps
47
+ * All business services listen as competing consumers (same pattern as workflow.init).
48
+ *
49
+ * Purpose:
50
+ * - Execute control-flow steps that are not pinned to a specific service
51
+ * - Keep workflow.init as a clear "gateway entrypoint" queue (no semantic overload)
52
+ *
53
+ * TTL: 30 seconds - if no business service processes message within 30s, it expires
54
+ * DLQ routing: Expired messages go to workflow.failed
55
+ */
56
+ control: {
57
+ durable: true,
58
+ arguments: {
59
+ 'x-message-ttl': 30000,
60
+ 'x-max-length': 10000,
61
+ 'x-dead-letter-exchange': '',
62
+ 'x-dead-letter-routing-key': 'workflow.failed'
63
+ }
64
+ },
65
+
45
66
  /**
46
67
  * workflow.completed - Completed workflows
47
68
  */