Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current implementation uses separate goroutines to process each message retrieved by `sqsClient.ReceiveMessageWithContext`, which is executed when `concurrencyMode` is set to `parallel`. The `consumeSubscription` function waits for all spawned goroutines to complete before receiving the next batch. However, this design has a critical flaw: it starves the consumer if new messages are published during the processing of an existing batch. These newly published messages won't be processed until all goroutines from the original batch have finished their work, effectively blocking the consumption of the new messages. This PR changes that by removing the waiting mechanism. Signed-off-by: Gustavo Chain <[email protected]>
- Loading branch information