@onlineapps/service-wrapper 2.1.97 → 2.1.99

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/service-wrapper",
3
- "version": "2.1.97",
3
+ "version": "2.1.99",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -29,9 +29,9 @@
29
29
  "@onlineapps/conn-infra-error-handler": "1.0.8",
30
30
  "@onlineapps/conn-infra-mq": "1.1.67",
31
31
  "@onlineapps/conn-orch-api-mapper": "1.0.26",
32
- "@onlineapps/conn-orch-cookbook": "2.0.29",
33
- "@onlineapps/conn-orch-orchestrator": "1.0.93",
34
- "@onlineapps/conn-orch-registry": "1.1.45",
32
+ "@onlineapps/conn-orch-cookbook": "2.0.31",
33
+ "@onlineapps/conn-orch-orchestrator": "1.0.95",
34
+ "@onlineapps/conn-orch-registry": "1.1.48",
35
35
  "@onlineapps/conn-orch-validator": "2.0.25",
36
36
  "@onlineapps/monitoring-core": "1.0.20",
37
37
  "@onlineapps/service-common": "1.0.15",
@@ -873,6 +873,20 @@ class ServiceWrapper {
873
873
  await this.registryClient.init();
874
874
  this.logger?.info('Registry client initialized');
875
875
 
876
+ // Service discovery is REQUIRED for workflow routing.
877
+ // Without registry change subscription, cookbook-router cannot verify target service availability.
878
+ // This must be enabled for ALL business services (they may receive workflow.init and must route).
879
+ try {
880
+ await this.registryClient.subscribeToChanges();
881
+ this.logger?.info('[ServiceWrapper] Registry change subscription enabled (subscribeToChanges)');
882
+ } catch (err) {
883
+ // Fail-fast: without registry events, routing is not deterministic.
884
+ throw new Error(
885
+ `[ServiceWrapper] Registry subscription failed - subscribeToChanges() is required for workflow routing. ` +
886
+ `Problem: ${err.message} - Fix: ensure registry.changes exchange is available and MQ connectivity is healthy.`
887
+ );
888
+ }
889
+
876
890
  // Register service
877
891
  const serviceInfo = {
878
892
  name: serviceName,