Wrap the given
Flow with a
Flow that will restart it when it completes or fails using exponential backoff. The backoff resets back to
minBackoff if there hasn’t been a restart within
maxRestartsWithin (which defaults to
Flow will not cancel, complete or emit a failure, until the opposite end of it has been cancelled or completed. Any termination by the
Flow before that time will be handled by restarting it as long as maxRestarts is not reached. Any termination signals sent to this
Flow however will terminate the wrapped
Flow, if it’s running, and then the
Flow will be allowed to terminate without being restarted.
The restart process is inherently lossy, since there is no coordination between cancelling and the sending of messages. A termination signal from either end of the wrapped
Flow will cause the other end to be terminated, and any in transit messages will be lost. During backoff, this
Flow will backpressure.
emits when the wrapped flow emits
backpressures during backoff and when the wrapped flow backpressures
maxRestarts are reached within the given time limit