@onlineapps/mq-client-core 1.0.59 → 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 +1 -0
- package/package.json +1 -1
- package/src/config/queueConfig.js +35 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -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
|
*/
|
|
@@ -54,7 +75,8 @@ module.exports = {
|
|
|
54
75
|
},
|
|
55
76
|
|
|
56
77
|
/**
|
|
57
|
-
* workflow.failed - Failed workflows
|
|
78
|
+
* workflow.failed - Failed workflows (DLQ entry point)
|
|
79
|
+
* Workflows land here after max retries exhausted, waiting for human decision
|
|
58
80
|
*/
|
|
59
81
|
failed: {
|
|
60
82
|
durable: true,
|
|
@@ -64,6 +86,18 @@ module.exports = {
|
|
|
64
86
|
}
|
|
65
87
|
},
|
|
66
88
|
|
|
89
|
+
/**
|
|
90
|
+
* workflow.discarded - Discarded workflows (final state)
|
|
91
|
+
* Workflows land here after human decision to discard from DLQ
|
|
92
|
+
*/
|
|
93
|
+
discarded: {
|
|
94
|
+
durable: true,
|
|
95
|
+
arguments: {
|
|
96
|
+
'x-message-ttl': 300000, // 5 minutes TTL
|
|
97
|
+
'x-max-length': 10000
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
|
|
67
101
|
/**
|
|
68
102
|
* workflow.dlq - Dead letter queue for workflows
|
|
69
103
|
*/
|