Table of Contents

Interface IBackoffPolicy

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

Interface for a Backoff Policy which determines if a IBackoffHandler should perform a backoff and how long to wait before performing the next backoff.

public interface IBackoffPolicy

Methods

RetrieveBackoffTime(int)

Performs a calculation based on the number of retries to determine how long the IBackoffHandler will wait before performing the next backoff.

TimeSpan RetrieveBackoffTime(int numberOfRetries)

Parameters

numberOfRetries int

The number of times the IBackoffHandler has retried a request after performing a backoff.

Returns

TimeSpan

A TimeSpan that indicates how long the IBackoffHandler should wait.

ShouldBackoff(Exception, SQSMessagePollerConfiguration)

Determines if a IBackoffHandler should perform a backoff.

bool ShouldBackoff(Exception exception, SQSMessagePollerConfiguration configuration)

Parameters

exception Exception

The exception that triggered a backoff in the IBackoffHandler.

configuration SQSMessagePollerConfiguration

Internal configuration for polling messages from SQS.

Returns

bool

A boolean that indicates whether the IBackoffHandler should backoff or not.