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

Application Error with a Suggested Retry Interval Duration #5796

Open
Albert-Coding opened this issue Apr 25, 2024 · 1 comment
Open

Application Error with a Suggested Retry Interval Duration #5796

Albert-Coding opened this issue Apr 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Albert-Coding
Copy link

Is your feature request related to a problem? Please describe.
Given an activity that calls a third-party service to perform a rate limited action, we return an application error when encountering a rate-limit response. Sometimes, the third-party rate limit suggestion is to NOT make another call for X-period of time which is dynamic (e.g. 5s to 90s).

Describe the solution you'd like
It would be nice if the application error could also hold a retry interval value so that the Temporal server would not schedule the activity retry until such time has elapse.

Describe alternatives you've considered
1- Set the activity's RetryPolicy.InitialInterval to the max X-period expected. This is bad because the activity is waiting too long before retrying.
or
2- Use a non-retryable application error and add details to it to then in the workflow make a timer and then retry the call. This bad for many reasons (not listed here because they are probably obvious).
or
3- Don't return an error. Have the activity handle the retrying by waiting and then trying again. This is bad because we're reinventing a feature that's a first-class citizen in Temporal. Additionally, it will take up an active activity slot.

@Albert-Coding Albert-Coding added the enhancement New feature or request label Apr 25, 2024
@gow
Copy link
Contributor

gow commented May 17, 2024

PR to allow workflow tasks to specify a retry delay interval - #5946
We still need to update the SDK to send this option before we can make this feature complete. Working on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants