From 3a292f23b03f82756335194ad96cd61d80f0a26f Mon Sep 17 00:00:00 2001 From: Bohdan Date: Mon, 18 Mar 2024 18:38:23 +0200 Subject: [PATCH] fix: Fix calling processMessage in handleSqsResponse --- src/consumer.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/consumer.ts b/src/consumer.ts index 283dae3..c4bfc25 100644 --- a/src/consumer.ts +++ b/src/consumer.ts @@ -312,7 +312,11 @@ export class Consumer extends TypedEventEmitter { if (this.handleMessageBatch) { await this.processMessageBatch(response.Messages); } else { - await Promise.all(response.Messages.map(this.processMessage)); + await Promise.all( + response.Messages.map((message: Message) => + this.processMessage(message), + ), + ); } this.emit("response_processed");