Is it possible to set retry intervals not based on an exponential backoff? Like a slice of
time.Duration or something
Hi @algollunism, I think what you are asking for is something like this (Java sample)
.setRetryOptions( RetryOptions.newBuilder() .setBackoffCoefficient(1) .setInitialInterval(Duration.ofSeconds(60)) .build())
setting backoff coefficient to 1 would set retries on interval basis (in this case every 60 seconds)
Thank you for your answer @tihomir
I would like to set intervals manually. For example, I have an array of durations, like this one:
[1h, 24h, 78h]. Is it possible to use an array of durations as retry intervals in Temporal? Perhaps there are some workarounds?
Currently you can only define this via RetryOptions but I think it would be a good feature to have, will bring it up to the SDK team and get back to you with their feedback.
Right now to be able to do what you requested I think you would need to use custom code logic for retries rather. With RetryOptions, we added a visualizer in docs for retry options if that helps.
You can implement retries using your own retry logic from the workflow code directly. The drawback is that if you do too many retries the history can grow too large.