Table of Contents

Interface IPoisonMessageDetector

Namespace
Excalibur.Dispatch.ErrorHandling
Assembly
Excalibur.Dispatch.dll

Defines the contract for detecting poison messages.

public interface IPoisonMessageDetector
Extension Methods

Methods

IsPoisonMessageAsync(IDispatchMessage, IMessageContext, MessageProcessingInfo, Exception?)

Determines whether a message should be considered poison based on processing context.

Task<PoisonDetectionResult> IsPoisonMessageAsync(IDispatchMessage message, IMessageContext context, MessageProcessingInfo processingInfo, Exception? exception = null)

Parameters

message IDispatchMessage

The message being processed.

context IMessageContext

The message context containing metadata.

processingInfo MessageProcessingInfo

Information about the current processing attempt.

exception Exception

The exception that occurred during processing, if any.

Returns

Task<PoisonDetectionResult>

A result indicating whether the message is poison and the reason.