Show / Hide Table of Contents

    Class RetryableErrorPolicyBase

    Builds an error policy that can be applied multiple times to the same message (e.g. RetryErrorPolicy or MoveMessageErrorPolicy).

    Inheritance
    object
    ErrorPolicyBase
    RetryableErrorPolicyBase
    MoveMessageErrorPolicy
    RetryErrorPolicy
    Implements
    IErrorPolicy
    Inherited Members
    ErrorPolicyBase.MaxFailedAttemptsCount
    ErrorPolicyBase.ExcludedExceptions
    ErrorPolicyBase.IncludedExceptions
    ErrorPolicyBase.ApplyRule
    ErrorPolicyBase.MessageToPublishFactory
    ErrorPolicyBase.ApplyTo<T>()
    ErrorPolicyBase.ApplyTo(Type)
    ErrorPolicyBase.Exclude<T>()
    ErrorPolicyBase.Exclude(Type)
    ErrorPolicyBase.ApplyWhen(Func<IRawInboundEnvelope, Exception, bool>)
    ErrorPolicyBase.Publish(Func<IRawInboundEnvelope, object>)
    ErrorPolicyBase.Publish(Func<IRawInboundEnvelope, Exception, object>)
    ErrorPolicyBase.Build(IServiceProvider)
    ErrorPolicyBase.BuildCore(IServiceProvider)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Inbound.ErrorHandling
    Assembly: Silverback.Integration.dll
    Syntax
    public abstract class RetryableErrorPolicyBase : ErrorPolicyBase, IErrorPolicy

    Methods

    | Improve this doc View source

    MaxFailedAttempts(int?)

    Specifies how many times this rule can be applied to the same message. If multiple policies are chained in an ErrorPolicyChain then the next policy will be triggered after the allotted amount of retries.

    Declaration
    public ErrorPolicyBase MaxFailedAttempts(int? maxFailedAttempts)
    Parameters
    Type Name Description
    int? maxFailedAttempts

    The number of retries.

    Returns
    Type Description
    ErrorPolicyBase

    The ErrorPolicyBase so that additional calls can be chained.

    Remarks

    The number of attempts at processing the message are stored locally, in memory and not persisted anywhere. A restart or a Kafka rebalance would cause them to reset.

    The messages are uniquely identified according to their IBrokerMessageIdentifier, if the message broker is providing a unique value like the Kafka offset. Otherwise the message id header value is used (MessageId). The mechanism will not work if no unique identifier is provided (e.g. MQTT) and no id header is sent with the message.

    Implements

    IErrorPolicy
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini