Skip to content

,System.Int32,System.TimeSpan)} ,System.Int32,System.TimeSpan,System.Double,System.Nullable,System.Reactive.Concurrency.IScheduler)}

ReactiveExtensions.RetryWithBackoff(IObservable, int, TimeSpan) method

Defined in

Type: ReactiveExtensions Namespace: ReactiveUI.Extensions Assembly: ReactiveUI.Extensions.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Overloads

  • 1. public static IObservable<T> RetryWithBackoff<T>(this IObservable<T> source, int maxRetries, TimeSpan initialDelay)
  • 2. public static IObservable<T> RetryWithBackoff<T>(this IObservable<T> source, int maxRetries, TimeSpan initialDelay, double backoffFactor, TimeSpan? maxDelay, IScheduler? scheduler)

1. Overload

public static IObservable<T> RetryWithBackoff<T>(this IObservable<T> source, int maxRetries, TimeSpan initialDelay)

View source

Summary: Retries with exponential backoff.

Type parameters

NameDescription
TElement type.

Parameters

NameTypeDescription
sourceIObservableSource sequence.
maxRetriesintMaximum number of retries.
initialDelayTimeSpanInitial backoff delay.

Returns: IObservable -- Retried sequence with backoff.

2. Overload

public static IObservable<T> RetryWithBackoff<T>(this IObservable<T> source, int maxRetries, TimeSpan initialDelay, double backoffFactor, TimeSpan? maxDelay, IScheduler? scheduler)

View source

Summary: Retries with exponential backoff.

Type parameters

NameDescription
TElement type.

Parameters

NameTypeDescription
sourceIObservableSource sequence.
maxRetriesintMaximum number of retries.
initialDelayTimeSpanInitial backoff delay.
backoffFactordoubleMultiplier for each retry (default 2).
maxDelayTimeSpan?Optional maximum delay.
scheduler[IScheduler?](#Scheduler (optional).

Returns: IObservable -- Retried sequence with backoff.