How to implement retry with exponential backoff? #161
Unanswered
tschuchortdev
asked this question in
Q&A
Replies: 1 comment
Unfortunately yes, current support for retries is quite minimal, but you can manage the retry state outside the workflow (e.g. in db table) and access it within
I totally agree, its just not implemented (yet). Adding state to retries should be relatively simple to implement. For now I created #163 to express the desire, its definitely a feature I'd like to have. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
In the documentation it says that stateful retry strategies like exponential backoff can be implemented by persisting the retry state:
The
retryfunction allows me to query theStatebut it does not allow me to write to it since the lambda function can only return anIO[Option[Instant]]:or does this sentence in the documentation mean that I should persist the retry state elsewhere (in a database for example)? That seems like something the workflow library should handle for me.
I know I could also implement exponential backoff using a
WIO.repeatandWIO.awaitbut that's a lot of work, a lot of additional code and I'm only retrying technical errors where I don't care if the backoff resets if the workflow instance is lost and recovered.All reactions