-
Notifications
You must be signed in to change notification settings - Fork 20
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
fixing a bug in which all handler retires executed within the same #82
Conversation
transaction When a handler fails and gets retried each retry should be run in a new transaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the tests proving this issue?
_ = worker.ack(delivery) | ||
} | ||
//else there was an error in the invokation then try rollingback the transaction and reject the message | ||
_ = worker.ack(delivery) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you ignoring the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after examining the code of worker.ack (and worker.nack) the retry strategy defined there retries the action until it succeeds (returns no error) in 100ms intervals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then we should fix the function . not to return an error but it would be a whole different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will do it in a diff PR
worker.log().WithError(rbkErr).Error("failed rolling back transaction when recovering from handler error") | ||
} | ||
} | ||
return handlerErr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏆
transaction
When a handler fails and gets retried each retry should be run in a new
transaction
Closes #81