elasticio-sailor-nodejs 2.7.3 → 2.7.4
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/CHANGELOG.md +4 -0
- package/lib/amqp.js +2 -2
- package/lib/sailor.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/amqp.js
CHANGED
|
@@ -495,7 +495,7 @@ class Amqp {
|
|
|
495
495
|
return result;
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
async sendRebound(reboundError, originalMessage) {
|
|
498
|
+
async sendRebound(reboundError, originalMessage, outgoingHeaders) {
|
|
499
499
|
const { settings } = this;
|
|
500
500
|
let { properties: { headers } } = originalMessage;
|
|
501
501
|
headers = {
|
|
@@ -513,7 +513,7 @@ class Amqp {
|
|
|
513
513
|
if (reboundIteration > settings.REBOUND_LIMIT) {
|
|
514
514
|
return this.sendError(
|
|
515
515
|
new Error('Rebound limit exceeded'),
|
|
516
|
-
|
|
516
|
+
outgoingHeaders,
|
|
517
517
|
originalMessage
|
|
518
518
|
);
|
|
519
519
|
} else {
|
package/lib/sailor.js
CHANGED
|
@@ -486,13 +486,14 @@ class Sailor {
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
async function onRebound(err) {
|
|
489
|
+
const outgoingHeaders = _.clone(outgoingMessageHeaders);
|
|
489
490
|
err = formatError(err);
|
|
490
491
|
logger.trace({
|
|
491
492
|
err,
|
|
492
493
|
messagesCount: that.messagesCount,
|
|
493
494
|
messageProcessingTime: Date.now() - timeStart
|
|
494
495
|
}, 'processMessage emit rebound');
|
|
495
|
-
return that.amqpConnection.sendRebound(err, message);
|
|
496
|
+
return that.amqpConnection.sendRebound(err, message, outgoingHeaders);
|
|
496
497
|
}
|
|
497
498
|
|
|
498
499
|
async function onSnapshot(data) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elasticio-sailor-nodejs",
|
|
3
3
|
"description": "The official elastic.io library for bootstrapping and executing for Node.js connectors",
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.4",
|
|
5
5
|
"main": "run.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"audit": "better-npm-audit audit --level high --production",
|