Table of Contents

Class RetryErrorPolicy

Namespace
Silverback.Messaging.Consuming.ErrorHandling
Assembly
Silverback.Integration.dll

This policy retries to process the message that previously failed to be to processed. An optional delay can be specified.

public record RetryErrorPolicy : ErrorPolicyBase, IErrorPolicy, IEquatable<ErrorPolicyBase>, IEquatable<RetryErrorPolicy>
Inheritance
RetryErrorPolicy
Implements
Inherited Members

Constructors

RetryErrorPolicy(RetryErrorPolicy)

protected RetryErrorPolicy(RetryErrorPolicy original)

Parameters

original RetryErrorPolicy

Properties

DelayFactor

Gets the factor to be applied to the delay to be applied at each retry.

public double DelayFactor { get; init; }

Property Value

double

DelayIncrement

Gets the increment to the delay to be applied at each retry.

public TimeSpan DelayIncrement { get; init; }

Property Value

TimeSpan

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

InitialDelay

Gets the delay to be applied to the first retry.

public TimeSpan InitialDelay { get; init; }

Property Value

TimeSpan

MaxDelay

Gets the maximum delay to be applied.

public TimeSpan? MaxDelay { get; init; }

Property Value

TimeSpan?

Methods

BuildCore(IServiceProvider)

Returns the actual error policy implementation, built using the provided IServiceProvider.

protected override ErrorPolicyImplementation BuildCore(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

The IServiceProvider to be used to build the error policy.

Returns

ErrorPolicyImplementation

An instance of IErrorPolicyImplementation that can be used to handle the processing error.

Equals(ErrorPolicyBase?)

public override sealed bool Equals(ErrorPolicyBase? other)

Parameters

other ErrorPolicyBase

Returns

bool

Equals(RetryErrorPolicy?)

public virtual bool Equals(RetryErrorPolicy? other)

Parameters

other RetryErrorPolicy

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(RetryErrorPolicy?, RetryErrorPolicy?)

public static bool operator ==(RetryErrorPolicy? left, RetryErrorPolicy? right)

Parameters

left RetryErrorPolicy
right RetryErrorPolicy

Returns

bool

operator !=(RetryErrorPolicy?, RetryErrorPolicy?)

public static bool operator !=(RetryErrorPolicy? left, RetryErrorPolicy? right)

Parameters

left RetryErrorPolicy
right RetryErrorPolicy

Returns

bool