Search Results for

    Show / Hide Table of Contents

    Class DomainExceptionHandlingBehaviour<TMessage>

    Catches IDomainException and logs them as warnings, preventing them from triggering MassTransit's retry policies.

    Inheritance
    object
    DomainExceptionHandlingBehaviour<TMessage>
    Implements
    IPipelineBehavior<TMessage>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Chapar.Pipeline.Behaviours
    Assembly: Chapar.Pipeline.dll
    Syntax
    public class DomainExceptionHandlingBehaviour<TMessage> : IPipelineBehavior<TMessage> where TMessage : IMessage
    Type Parameters
    Name Description
    TMessage

    Constructors

    | Edit this page View Source

    DomainExceptionHandlingBehaviour(ILogger<DomainExceptionHandlingBehaviour<TMessage>>)

    Declaration
    public DomainExceptionHandlingBehaviour(ILogger<DomainExceptionHandlingBehaviour<TMessage>> logger)
    Parameters
    Type Name Description
    ILogger<DomainExceptionHandlingBehaviour<TMessage>> logger

    Methods

    | Edit this page View Source

    HandleAsync(TMessage, Func<Task>, CancellationToken)

    Executes the behaviour and optionally calls the next delegate in the pipeline.

    Declaration
    public Task HandleAsync(TMessage message, Func<Task> next, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    TMessage message

    The message to process.

    Func<Task> next

    A delegate representing the next action in the pipeline.

    CancellationToken cancellationToken

    Token to cancel the operation.

    Returns
    Type Description
    Task

    Implements

    IPipelineBehavior<TMessage>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2026