Method BackoffWithJitterAsync
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
NatsOptsThe NatsOpts instance containing configuration settings for intervals and jitter.
iter
intThe current attempt iteration, used to calculate the exponential delay.
Returns
- Task
A task that completes after the calculated delay time has elapsed.