Force activity to retry immediately while waiting for next retry

Hi Temporal Team,

We have a scenario that we have set up retry options. And there is “maximumInterval = 300 second” and “backoffCoefficient = 1.2” being set.
However while waiting for next retry we want to stop the waiting and start the next retry immediately. This is an operational level action.

Is there any recommendation for achieving above scenarios?
I think probably we can do the reset? is there any recommended way to achieve this?

Best regards,
Jx

This is not yet supported. We are planning to add retry now operational API. No ETA yet.

1 Like

Hello,

Any updates on this? Is the “Retry Now” option for activity now supported or not yet?

Hi @Khaled_Baghdadi

You can override the next retryDelay now, which might help

Antonio

Hello Antonio, thanks for the reply!

If I understood correctly, here when an activity throws an ApplicationFailure it can also specify the next time it retries.

However, the case I have in mind is that the workflow decides to retry activity now.

I want an acitivty to retry each 5 minutes, but if my workflow received a “retryNow” signal, I want it to force the activity to retry immediately. Is this functionality supported or planned to be supported?

Hi,
sorry, there is an Activity Operability API now that you can use (it is in pre-release)

for this, you can start temporal server with frontend.activityAPIsEnabled=true

./temporal server start-dev --dynamic-config-value frontend.activityAPIsEnabled=true

Then, reseting the activity will trigger it immediately (note that his is not exactly the same as “retryNow”, it will reset the activity execution)

temporal activity reset --workflow-id=“MyWorkflowID” --activity-id=”MyActivityID”
1 Like