-
Notifications
You must be signed in to change notification settings - Fork 58
Description
We're encountering an issue in our production (PROD) environment where successful SQS messages (with no errors thrown) are being requeued, even though they should be deleted after processing. We are using the @ssut/nestjs-sqs package, which should handle message deletion automatically, so no explicit deletion is required in the handler.
The strange part is that I cannot replicate this issue in our development (DEV) environment, where successful SQS messages are properly deleted. The DEV environment runs on Google Cloud Run with autoscaling (though it probably only runs one instance due to low traffic).
The only significant difference I can think of is our PROD environment setup, which uses autoscaled ECS tasks. After checking the logs, it seems like the SQS messages are being read by multiple ECS tasks simultaneously. Even though I’ve already increased the visibility timeout for the SQS queue, the successful messages are still being requeued.
Has anyone encountered a similar issue or have any insights on why successful messages might not be deleted in an autoscaled ECS environment? Any help or suggestions would be greatly appreciated!