@onlineapps/mq-client-core 1.0.43 → 1.0.45

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.43",
3
+ "version": "1.0.45",
4
4
  "description": "Core MQ client library for RabbitMQ - shared by infrastructure services and connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -207,14 +207,20 @@ module.exports = {
207
207
 
208
208
  /**
209
209
  * Monitoring infrastructure queue configurations
210
- * These are dedicated queues for Monitoring service (separate from delivery queues)
210
+ * These are dedicated queues for Monitoring service (infrastructure service)
211
+ *
212
+ * CRITICAL: Monitoring is an infrastructure service, monitoring queues are infrastructure queues!
213
+ * All services (both infrastructure and business) publish monitoring events here.
211
214
  */
212
215
  monitoring: {
213
216
  /**
214
- * monitoring.workflow.completed - Completed workflows for monitoring
215
- * Business services publish here for observability (separate from workflow.completed for delivery)
217
+ * monitoring.workflow - Unified workflow lifecycle monitoring
218
+ * Delivery Dispatcher publishes 'completed'/'failed' events after processing workflow.completed/workflow.failed
219
+ * Business services publish 'progress' events during workflow step processing
220
+ * Message format includes event_type: 'completed' | 'failed' | 'progress'
221
+ * Includes full cookbook and context snapshots for trace storage
216
222
  */
217
- 'workflow.completed': {
223
+ 'workflow': {
218
224
  durable: true,
219
225
  arguments: {
220
226
  'x-message-ttl': 300000, // 5 minutes TTL
@@ -223,36 +229,19 @@ module.exports = {
223
229
  },
224
230
 
225
231
  /**
226
- * monitoring.workflow.failed - Failed workflows for monitoring
227
- * Business services publish here for observability (separate from workflow.failed for delivery)
232
+ * monitoring.services - Service lifecycle events monitoring
233
+ * Registry publishes service lifecycle events (registered, validation.completed, version.changed, status.changed)
234
+ * InfrastructureHealthTracker publishes service status changes
235
+ * Message format includes event_type: 'service.registered' | 'service.validation.completed' |
236
+ * 'service.version.changed' | 'service.deregistered' | 'service.status.changed'
237
+ * NOTE: Heartbeats are NOT published here (too frequent, every 10s)
238
+ * NOTE: Healthcheck messages go to infrastructure.health.events exchange
228
239
  */
229
- 'workflow.failed': {
240
+ 'services': {
230
241
  durable: true,
231
242
  arguments: {
232
- 'x-message-ttl': 300000, // 5 minutes TTL
233
- 'x-max-length': 10000
234
- }
235
- },
236
-
237
- /**
238
- * monitoring.registry.events - Registry events for monitoring
239
- */
240
- 'registry.events': {
241
- durable: true,
242
- arguments: {
243
- 'x-message-ttl': 60000, // 1 minute TTL
244
- 'x-max-length': 5000
245
- }
246
- },
247
-
248
- /**
249
- * monitoring.service.heartbeats - Service heartbeats for monitoring
250
- */
251
- 'service.heartbeats': {
252
- durable: true,
253
- arguments: {
254
- 'x-message-ttl': 120000, // 2 minutes TTL
255
- 'x-max-length': 10000
243
+ 'x-message-ttl': 600000, // 10 minutes TTL (longer for service tracking)
244
+ 'x-max-length': 20000
256
245
  }
257
246
  }
258
247
  },
@@ -262,27 +251,28 @@ module.exports = {
262
251
  */
263
252
  registry: {
264
253
  /**
265
- * registry.register - Registration requests
254
+ * registry.register - Main queue for ALL service communication with Registry
255
+ *
256
+ * CRITICAL: This is the ONLY queue used for service-to-Registry communication.
257
+ * Registry listener processes different message types based on msg.type:
258
+ * - type: 'register' - Service registration requests
259
+ * - type: 'heartbeat' - Periodic health check messages (sent every 10s)
260
+ * - type: 'apiDescription' - API specification responses
261
+ *
262
+ * Architecture rationale:
263
+ * - Single consumer on registry.register handles all message types
264
+ * - Simplifies queue management (one queue instead of multiple)
265
+ * - Registry can process messages in order and maintain state consistency
266
+ * - All business services send both registration AND heartbeats to this queue
266
267
  */
267
268
  register: {
268
269
  durable: true,
269
270
  arguments: {
270
- 'x-message-ttl': 60000, // 1 minute TTL
271
+ 'x-message-ttl': 60000, // 1 minute TTL (for registration requests)
271
272
  'x-max-length': 1000
272
273
  }
273
274
  },
274
275
 
275
- /**
276
- * registry.heartbeats - Service heartbeats
277
- */
278
- heartbeats: {
279
- durable: true,
280
- arguments: {
281
- 'x-message-ttl': 120000, // 2 minutes TTL
282
- 'x-max-length': 5000
283
- }
284
- },
285
-
286
276
  /**
287
277
  * registry.changes - Registry event fanout exchange
288
278
  * (This is an exchange, not a queue, but included for reference)