Skip to content
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

Provide option for max retires, and a call back when reached (potential DLQ) #196

Open
Tracked by #172
astubbs opened this issue Feb 15, 2022 · 4 comments
Open
Tracked by #172

Comments

@astubbs
Copy link
Contributor

astubbs commented Feb 15, 2022

Atm, user has to implement the max retry functionality themselves, as documented here: retries docs branch

This should be part of the system, as an option for a max retry count. When the count is reached, a callback should be executed, providing the user the WorkContainer and the chance to do something with it - maybe produce it do a different topic (DLQ) or simply log it.

@astubbs astubbs mentioned this issue Feb 15, 2022
5 tasks
@sarwarbhuiyan
Copy link

Following up on the conversation we were having on this issue, there would be an approach here so as not to require the lambda signature to change to pass in WorkContainer vs ConsumerRecord.

Since the ConsumerRecord has a headers() object, we can increment a retry count as a known header in that in the framework. That way, the user could have access to the retryCount from the lambda and skip the exception (we could just do a docs section on that) if they want. Or the framework could compare a configured max_retries and check the retry_count header and trap out of continuing to process that record.

This is very similar to how Spring utilizes ConsumerRecord headers to pass a serialization exception so as to be able to handle a poison pill without causing an exception to be thrown.

@astubbs
Copy link
Contributor Author

astubbs commented Feb 15, 2022

Draft implementation of this in #197 - user can easily implement max retries and DLQ upon exceeded

@astubbs
Copy link
Contributor Author

astubbs commented May 17, 2022

FYI see PollContext object passed in to lambda to get failure counts of records.

@astubbs
Copy link
Contributor Author

astubbs commented Jul 27, 2022

DLQ tracked here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants