@hastehaul/common 2.0.9 → 2.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -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++;
|