maxDuration

val maxDuration: Duration? = null

Maximum duration of the retry loop.

The policy gives up retrying when either the retry loop lasted at least for this given max duration, or the maxAttempts (if set) is reached first. If both maxAttempts and maxDuration are null, the policy will retry indefinitely.

Note: The real retry loop duration may be higher than the given duration. TThis is due to the nature of the run operation, which executes the closure on the service and sends the result afterward to Restate.