Table of Contents

Method BackoffWithJitterAsync

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

BackoffWithJitterAsync(NatsOpts, int)

Applies an exponential backoff delay with an added random jitter for attempts.

public static Task BackoffWithJitterAsync(this NatsOpts opts, int iter)

Parameters

opts NatsOpts

The NatsOpts instance containing configuration settings for intervals and jitter.

iter int

The current attempt iteration, used to calculate the exponential delay.

Returns

Task

A task that completes after the calculated delay time has elapsed.