@onlineapps/service-wrapper 2.0.4 → 2.0.6
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 +1 -1
- package/src/ServiceWrapper.js +6 -3
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -254,8 +254,11 @@ class ServiceWrapper {
|
|
|
254
254
|
});
|
|
255
255
|
await this.mqClient.connect();
|
|
256
256
|
|
|
257
|
-
// Initialize registry client
|
|
257
|
+
// Initialize registry client with required parameters
|
|
258
258
|
this.registryClient = new RegistryConnector.ServiceRegistryClient({
|
|
259
|
+
amqpUrl: rabbitUrl,
|
|
260
|
+
serviceName: this.serviceName,
|
|
261
|
+
version: this.openApiSpec?.info?.version || '1.0.0',
|
|
259
262
|
registryUrl: this.config.registry || process.env.REGISTRY_URL || 'http://localhost:4000',
|
|
260
263
|
logger: this.logger
|
|
261
264
|
});
|
|
@@ -294,6 +297,7 @@ class ServiceWrapper {
|
|
|
294
297
|
|
|
295
298
|
// Subscribe to workflow messages
|
|
296
299
|
await this.mqClient.consume(
|
|
300
|
+
queueName,
|
|
297
301
|
async (message) => {
|
|
298
302
|
try {
|
|
299
303
|
// Delegate ALL processing to orchestrator
|
|
@@ -315,8 +319,7 @@ class ServiceWrapper {
|
|
|
315
319
|
error: error.message
|
|
316
320
|
});
|
|
317
321
|
}
|
|
318
|
-
}
|
|
319
|
-
{ queue: queueName }
|
|
322
|
+
}
|
|
320
323
|
);
|
|
321
324
|
|
|
322
325
|
this.logger.info(`Subscribed to queue: ${queueName}`);
|