@onlineapps/service-wrapper 2.0.3 → 2.0.5

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.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -244,12 +244,21 @@ class ServiceWrapper {
244
244
  queue: `${this.serviceName}.workflow`,
245
245
  prefetch: this.config.prefetch || 10,
246
246
  durable: true,
247
- noAck: false
247
+ noAck: false,
248
+ logger: {
249
+ info: (...args) => this.logger.info(...args),
250
+ warn: (...args) => this.logger.warn(...args),
251
+ error: (...args) => this.logger.error(...args),
252
+ debug: (...args) => this.logger.debug(...args)
253
+ }
248
254
  });
249
255
  await this.mqClient.connect();
250
256
 
251
- // Initialize registry client
257
+ // Initialize registry client with required parameters
252
258
  this.registryClient = new RegistryConnector.ServiceRegistryClient({
259
+ amqpUrl: rabbitUrl,
260
+ serviceName: this.serviceName,
261
+ version: this.openApiSpec?.info?.version || '1.0.0',
253
262
  registryUrl: this.config.registry || process.env.REGISTRY_URL || 'http://localhost:4000',
254
263
  logger: this.logger
255
264
  });