Skip to content

Commit

Permalink
fix: Fix calling processMessage in handleSqsResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
mogu4iy committed Mar 18, 2024
1 parent 6b7303e commit 3a292f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3a292f2

Please sign in to comment.