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
messageIDispatchMessageThe message being processed.
contextIMessageContextThe message context containing metadata.
processingInfoMessageProcessingInfoInformation about the current processing attempt.
exceptionExceptionThe exception that occurred during processing, if any.
Returns
- Task<PoisonDetectionResult>
A result indicating whether the message is poison and the reason.