Show / Hide Table of Contents

    Class RetryErrorPolicyBuilder

    Builds the RetryErrorPolicy.

    Inheritance
    object
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>
    RetryErrorPolicyBuilder
    Inherited Members
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.ApplyTo<T>()
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.ApplyTo(Type)
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.Exclude<T>()
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.Exclude(Type)
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.ApplyWhen(Func<IRawInboundEnvelope, bool>)
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.ApplyWhen(Func<IRawInboundEnvelope, Exception, bool>)
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.Publish(Func<IRawInboundEnvelope, object>)
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.Publish(Func<IRawInboundEnvelope, Exception, object>)
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.Build()
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Configuration
    Assembly: Silverback.Integration.dll
    Syntax
    public class RetryErrorPolicyBuilder : ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>

    Constructors

    RetryErrorPolicyBuilder()

    Builds the RetryErrorPolicy.

    Declaration
    public RetryErrorPolicyBuilder()

    Properties

    This

    Gets this instance.

    Declaration
    protected override RetryErrorPolicyBuilder This { get; }
    Property Value
    Type Description
    RetryErrorPolicyBuilder
    Overrides
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.This
    Remarks

    This is necessary to work around casting in the base classes.

    Methods

    BuildCore()

    Builds the error policy instance.

    Declaration
    protected override ErrorPolicyBase BuildCore()
    Returns
    Type Description
    ErrorPolicyBase

    The error policy.

    Overrides
    ErrorPolicyBaseBuilder<RetryErrorPolicyBuilder>.BuildCore()

    WithExponentialDelay(TimeSpan, double, TimeSpan?)

    Specifies an initial delay before the first retry and a factor to be applied to the delay at each retry.

    Declaration
    public RetryErrorPolicyBuilder WithExponentialDelay(TimeSpan initialDelay, double delayFactor, TimeSpan? maxDelay = null)
    Parameters
    Type Name Description
    TimeSpan initialDelay

    The initial delay before the first retry.

    double delayFactor

    The factor to be applied at each retry.

    TimeSpan? maxDelay

    The maximum delay to be applied.

    Returns
    Type Description
    RetryErrorPolicyBuilder

    The policy builder so that additional calls can be chained.

    WithIncrementalDelay(TimeSpan, TimeSpan, TimeSpan?)

    Specifies an initial delay before the first retry and an increment to be added at each subsequent retry.

    Declaration
    public RetryErrorPolicyBuilder WithIncrementalDelay(TimeSpan initialDelay, TimeSpan delayIncrement, TimeSpan? maxDelay = null)
    Parameters
    Type Name Description
    TimeSpan initialDelay

    The initial delay before the first retry.

    TimeSpan delayIncrement

    The increment to be added at each subsequent retry.

    TimeSpan? maxDelay

    The maximum delay to be applied.

    Returns
    Type Description
    RetryErrorPolicyBuilder

    The policy builder so that additional calls can be chained.

    WithInterval(TimeSpan)

    Specifies the interval between retries.

    Declaration
    public RetryErrorPolicyBuilder WithInterval(TimeSpan interval)
    Parameters
    Type Name Description
    TimeSpan interval

    The interval between retries.

    Returns
    Type Description
    RetryErrorPolicyBuilder

    The policy builder so that additional calls can be chained.

    WithMaxRetries(int)

    Sets the number of times this policy should be applied to the same message in case of multiple failed attempts.

    Declaration
    public RetryErrorPolicyBuilder WithMaxRetries(int retries)
    Parameters
    Type Name Description
    int retries

    The number of times this policy should be applied.

    Returns
    Type Description
    RetryErrorPolicyBuilder

    The policy builder so that additional calls can be chained.

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini