@azteam/rabbitmq-async 1.0.212 → 1.0.214

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.
@@ -30,6 +30,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
30
30
  this.host = config.host;
31
31
  this.prefix = config.prefix;
32
32
  this.serverIp = config.server_ip;
33
+ this.retryKey = config.retry_key;
33
34
  this.listConsume = [];
34
35
  this.client = null;
35
36
  this.channel = null;
@@ -352,7 +353,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
352
353
  break;
353
354
  case 11:
354
355
  _context7.next = 13;
355
- return messageQueue.send(messageQueue.parsePrefix('RETRY'), {
356
+ return messageQueue.send(messageQueue.parsePrefix(this.retryKey), {
356
357
  queueName: queueName,
357
358
  data: data,
358
359
  retry_time: new Date(),
@@ -419,7 +420,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
419
420
  case "end":
420
421
  return _context7.stop();
421
422
  }
422
- }, _callee7, null, [[3, 41], [17, 24]]);
423
+ }, _callee7, this, [[3, 41], [17, 24]]);
423
424
  }));
424
425
  return function (_x5) {
425
426
  return _ref2.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/rabbitmq-async",
3
- "version": "1.0.212",
3
+ "version": "1.0.214",
4
4
  "description": "N/A",
5
5
  "keywords": [
6
6
  "toda",
package/src/Provider.js CHANGED
@@ -4,6 +4,7 @@ class Provider {
4
4
  constructor(configs = []) {
5
5
  this.connections = {};
6
6
  this.configs = {};
7
+
7
8
  if (Array.isArray(configs)) {
8
9
  configs.map((config) => {
9
10
  this.configs[config.name] = config;
@@ -11,6 +11,7 @@ class RabbitMQAsync {
11
11
  this.host = config.host;
12
12
  this.prefix = config.prefix;
13
13
  this.serverIp = config.server_ip;
14
+ this.retryKey = config.retry_key;
14
15
 
15
16
  this.listConsume = [];
16
17
 
@@ -140,7 +141,7 @@ class RabbitMQAsync {
140
141
  if (data.retry > 0) {
141
142
  await messageQueue.send(queueName, data);
142
143
  } else {
143
- await messageQueue.send(messageQueue.parsePrefix('RETRY'), {
144
+ await messageQueue.send(messageQueue.parsePrefix(this.retryKey), {
144
145
  queueName,
145
146
  data,
146
147
  retry_time: new Date(),