-
Notifications
You must be signed in to change notification settings - Fork 37
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
Prototype "before retry action" support #485
Conversation
Hi, sorry for not getting to this sooner, I'm quite busy elsewhere. I didn't really expect anyone to pick up ideas from the backlog and run with them :-) For next time, I'd probably recommend trying to start a discussion on the issue -- though of course a preliminary PR like this can be seen as a form of starting a discussion. I converted this PR to a draft to highlight that. I confirm that the idea was to make this a SmallRye-specific feature for now. The code looks mostly fine, though there is one thing that I didn't expect. You implement "before retry" support as an additional FT strategy, which is inserted into the chain immediately after the "retry" strategy -- while I originally planned to embed this directly into the "retry" strategies. Clearly it works, though I'm not sure if it perhaps prevents some interesting features (such as aborting the entire retry) and if it maybe interacts weirdly with exception handling. Those are API design questions, though. Actually API design is at least as important as implementation, if not more -- but unfortunately, you left the annotation undocumented. That would have to change for sure, before this could be merged. Also I think the |
Hi @Ladicek.
No problem. I created the PR to start the discussion (and see if I would be able to implement this) :-)
"That would have to change for sure, before this could be merged."
👍🏽 I'll do that. I might not be able to touch on this in the next few of days, but since you're busy with other stuff, that might not be a problem. |
Documentation is what I meant here. The implementation strategy is certainly valid -- I just didn't expect it, that's all. When you (or me, or someone else) write the documentation, it might turn out that this implementation strategy perhaps isn't the best, or maybe it is, I don't know :-) I started prototyping another feature (rate limiting) and API with documentation is the first thing I did.
That is not a problem at all! |
I'm closing this PR since I won't be able to work on this in the short term. |
No worries, and thanks for spending your time on this! |
PR to solve #259.
Considerations:
beforeRetryMethod
. It should be used like the following: