Table of Contents

Interface IBackoffHandler

Namespace
AWS.Messaging.Services.Backoff
Assembly
AWS.Messaging.dll

Interface for a backoff handler that is responsible for performing back-offs in the event that a given delegate throws an exception. The delegate will be retried after backing off for a certain period of time. The IBackoffHandler could be used with a IBackoffPolicy to determine whether a backoff should occur and how long to wait between back-offs.

public interface IBackoffHandler

Methods

BackoffAsync<T>(Func<Task<T>>, SQSMessagePollerConfiguration, CancellationToken)

Performs a back off in the event that a given delegate throws an exception. The delegate will be retried after backing off for a certain period of time.

Task<T> BackoffAsync<T>(Func<Task<T>> task, SQSMessagePollerConfiguration configuration, CancellationToken token)

Parameters

task Func<Task<T>>

The delegate for which to perform a backoff.

configuration SQSMessagePollerConfiguration

Internal configuration for polling messages from SQS.

token CancellationToken

The cancellation token used to cancel the request.

Returns

Task<T>

Type Parameters

T