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

Expose the number of max attempts to the retry context for all policies #395

Closed
e-ivaldi opened this issue Oct 31, 2023 · 2 comments
Closed
Milestone

Comments

@e-ivaldi
Copy link
Contributor

e-ivaldi commented Oct 31, 2023

It is sometimes useful to be aware, within a retry context, whether the current attempt is the last attempt when using a 'maximum number of attempts before failure' type of retry policy.

Following up on this discussion I am opening a small PR to add that type of support to spring-retry.

In order to achieve the desired result, for all policies, a new attribute is going to be added to the context named "context.max-attempts" that will contain the number of max attempts set in the policy, if any, or -1 otherwise.

The PR won't provide extra support to read and parse the attribute value via ad-hoc methods added to the retry contexts themselves.

PR link: #396

e-ivaldi added a commit to e-ivaldi/spring-retry that referenced this issue Oct 31, 2023
@deathcoder
Copy link

deathcoder commented Nov 6, 2023

@garyrussell i saw you were involved in the discussion, i'm just not familiar with the process here, how can we get the pr reviewed?

@garyrussell
Copy link
Contributor

Someone just has to pick it up; I have been out sick the last couple of weeks; as such, I have a huge backlog so I may not get to this for a while.

e-ivaldi added a commit to e-ivaldi/spring-retry that referenced this issue Nov 17, 2023
e-ivaldi added a commit to e-ivaldi/spring-retry that referenced this issue Nov 17, 2023
e-ivaldi added a commit to e-ivaldi/spring-retry that referenced this issue Nov 17, 2023
e-ivaldi added a commit to e-ivaldi/spring-retry that referenced this issue Nov 17, 2023
e-ivaldi added a commit to e-ivaldi/spring-retry that referenced this issue Nov 17, 2023
e-ivaldi added a commit to e-ivaldi/spring-retry that referenced this issue Nov 17, 2023
@artembilan artembilan added this to the 2.0.5 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants