@onlineapps/service-wrapper 2.0.2 → 2.0.3

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.2",
3
+ "version": "2.0.3",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -235,12 +235,16 @@ class ServiceWrapper {
235
235
  * @returns {Promise<void>}
236
236
  */
237
237
  async _initializeConnectors() {
238
- // Initialize MQ client
238
+ // Initialize MQ client with correct config format
239
+ const rabbitUrl = this.config.rabbitmq || process.env.RABBITMQ_URL || 'amqp://localhost:5672';
240
+
239
241
  this.mqClient = new MQConnector({
240
- url: this.config.rabbitmq || process.env.RABBITMQ_URL || 'amqp://localhost:5672',
241
- serviceName: this.serviceName,
242
- prefetchCount: this.config.prefetch || 10,
243
- logger: this.logger
242
+ type: 'rabbitmq',
243
+ host: rabbitUrl,
244
+ queue: `${this.serviceName}.workflow`,
245
+ prefetch: this.config.prefetch || 10,
246
+ durable: true,
247
+ noAck: false
244
248
  });
245
249
  await this.mqClient.connect();
246
250