-
Notifications
You must be signed in to change notification settings - Fork 153
Bug: Retry of previously failed SQS record is skipped when skipGroupOnError
is enabled
#3673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @mlrprananta, thank you for opening this issue and providing a potential solution. I was able to reproduce the issue you described. I'll work on a PR to fix it. |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.16.0 version! |
Expected Behavior
When a SQS record that failed in a previous Lambda invocation is retried and handled by the same Lambda instance again, it should be processed by the provided
recordHandler
Current Behavior
When a SQS record that failed in a previous Lambda batch invocation is retried and handled by the same Lambda instance again, it is skipped and returned as a failure without going through the
recordHandler
.Only if the record is handled by a concurrent Lambda instance will it be processed again.
Code snippet
Steps to Reproduce
SQS HANDLER INVOKED
andRECORD HANDLER INVOKED
for the first invocation, and after the visibility timeout it will only logSQS HANDLER INVOKED
for follow-up invocations, untilmaxReceiveCount
is hit and the message is moved to the DLQPossible Solution
In
SqsProcessor
, thefailedGroupIds
should be cleared after each Lambda invocation.Introduce a method to clear the
failedGroupIds
inSqsProcesor
.In
SqsFifoPartialProcessorAsync
override theprepare
method and add a call to clearfailedGroupIds
.Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
18.x
Packaging format used
npm
Execution logs
The text was updated successfully, but these errors were encountered: