@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.
- package/lib/RabbitMQAsync.js +3 -2
- package/package.json +1 -1
- package/src/Provider.js +1 -0
- package/src/RabbitMQAsync.js +2 -1
package/lib/RabbitMQAsync.js
CHANGED
|
@@ -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(
|
|
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,
|
|
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
package/src/Provider.js
CHANGED
package/src/RabbitMQAsync.js
CHANGED
|
@@ -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(
|
|
144
|
+
await messageQueue.send(messageQueue.parsePrefix(this.retryKey), {
|
|
144
145
|
queueName,
|
|
145
146
|
data,
|
|
146
147
|
retry_time: new Date(),
|