@onlineapps/service-wrapper 2.0.32 → 2.0.33
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 +2 -2
- package/src/ServiceWrapper.js +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/service-wrapper",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33",
|
|
4
4
|
"description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@onlineapps/conn-base-cache": "^1.0.0",
|
|
28
28
|
"@onlineapps/conn-base-monitoring": "^1.0.1",
|
|
29
29
|
"@onlineapps/conn-infra-error-handler": "^1.0.0",
|
|
30
|
-
"@onlineapps/conn-infra-mq": "^1.1.
|
|
30
|
+
"@onlineapps/conn-infra-mq": "^1.1.9",
|
|
31
31
|
"@onlineapps/conn-orch-api-mapper": "^1.0.0",
|
|
32
32
|
"@onlineapps/conn-orch-cookbook": "^2.0.0",
|
|
33
33
|
"@onlineapps/conn-orch-orchestrator": "^1.0.1",
|
package/src/ServiceWrapper.js
CHANGED
|
@@ -258,6 +258,8 @@ class ServiceWrapper {
|
|
|
258
258
|
this.mqClient = new MQConnector({
|
|
259
259
|
type: 'rabbitmq',
|
|
260
260
|
host: mqUrl,
|
|
261
|
+
serviceName,
|
|
262
|
+
autoSetupServiceQueues: false,
|
|
261
263
|
queue: `${serviceName}.workflow`,
|
|
262
264
|
prefetch: this.config.wrapper?.mq?.prefetch || 10,
|
|
263
265
|
durable: true,
|
|
@@ -329,6 +331,14 @@ class ServiceWrapper {
|
|
|
329
331
|
// Both workflow.init and service-specific listeners start here
|
|
330
332
|
if (registrationResult.success && registrationResult.certificate) {
|
|
331
333
|
this.logger?.info('✓ Certificate validated, starting workflow listeners...');
|
|
334
|
+
try {
|
|
335
|
+
await this.mqClient.setupServiceQueues(serviceName, { includeWorkflow: true });
|
|
336
|
+
this.logger?.info('✓ Business queues initialized via QueueManager');
|
|
337
|
+
} catch (queueError) {
|
|
338
|
+
this.logger?.error('Failed to initialize business queues', { error: queueError.message });
|
|
339
|
+
throw new Error(`Failed to initialize business queues for ${serviceName}: ${queueError.message}`);
|
|
340
|
+
}
|
|
341
|
+
|
|
332
342
|
// Start workflow.init listener (for all services)
|
|
333
343
|
await this._startWorkflowInitListener();
|
|
334
344
|
// Start service-specific workflow listener
|