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

Rework limitRetries to possible infinite retries #188

Open
Ssstlis opened this issue Mar 30, 2020 · 2 comments · May be fixed by #193
Open

Rework limitRetries to possible infinite retries #188

Ssstlis opened this issue Mar 30, 2020 · 2 comments · May be fixed by #193

Comments

@Ssstlis
Copy link

Ssstlis commented Mar 30, 2020

Also similar to akka i wanna have retry policy with infinite retries, based on arg maxRetries = -1
If you don't mind i can draft a PR and deprecate old version.

@cb372
Copy link
Owner

cb372 commented Mar 31, 2020

The default behaviour of the other built-in retry policies is to do infinite retries. limitRetries is used specifically to prevent that behaviour.

e.g. constantDelay(100.milliseconds) will keep retrying forever, but constantDelay(100.milliseconds) join limitRetries(5) will only retry 5 times.

So I don't think a version of limitRetries that does not limit retries would be helpful.

Does that make sense? Maybe the docs could be improved to explain this better.

@Ssstlis
Copy link
Author

Ssstlis commented Mar 31, 2020

Okay, it seems like i can use constantDelay(Duration.Zero) join .... for reproduce the infinite retries but in case of finite number of retries i should write this: limitRetries(n) join ....
don't you think this isn't consistent?

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

Successfully merging a pull request may close this issue.

2 participants