@hastehaul/common 2.0.9 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -54,7 +54,7 @@ class NatsConsumer {
|
|
54
54
|
ack_policy: nats_1.AckPolicy.Explicit,
|
55
55
|
ack_wait: this.ackWait,
|
56
56
|
durable_name: this.durableName,
|
57
|
-
replay_policy: nats_1.ReplayPolicy.
|
57
|
+
replay_policy: nats_1.ReplayPolicy.Original,
|
58
58
|
filter_subject: this.subject,
|
59
59
|
};
|
60
60
|
}
|
@@ -87,12 +87,12 @@ class NatsConsumer {
|
|
87
87
|
yield this.processMessage(parsedMessage, msg).then(() => { inFlight--; }).catch(() => { inFlight--; });
|
88
88
|
}
|
89
89
|
else {
|
90
|
-
console.log("PENDING MESSAGES: ", pendingMessages);
|
90
|
+
console.log("1 PENDING MESSAGES: ", pendingMessages);
|
91
91
|
pendingMessages.push(msg); // Store the message to be processed later
|
92
92
|
}
|
93
93
|
// Check if there are pending messages that can be processed
|
94
94
|
while (pendingMessages.length && inFlight < this.maxConcurrentMessages) {
|
95
|
-
console.log("PENDING MESSAGES: ", pendingMessages);
|
95
|
+
console.log("2 PENDING MESSAGES: ", pendingMessages);
|
96
96
|
const pendingMessage = pendingMessages.shift();
|
97
97
|
const parsedMessage = this.parsedMessage(pendingMessage);
|
98
98
|
inFlight++;
|