While executing tasks, if there is a failure would like to define configuration to retry after certain interval and resume from the task that failed. Is it possible to implement the resume option?
There is no need for resume option for the business failures in the majority of the cases.
The common pattern is to keep retrying until the downstream dependency is available. This is possible as Temporal/Cadence doesn't have system imposed limit on the duration of the activity retries. If the downstream system can be down for days it is OK to keep retrying for days.
If for some reason you want to stop retrying after some time and then resume it on an external signal then can be implemented as part of the workflow logic which on certain types of activity errors workflow sleeps for an external signal to resume.
Update: I added a sample of an interceptor that stops activity retries until a signal to fail or keep retrying is received.