Interface IMessageChannelAcknowledger<TMessage>
Defines the acknowledgement contract for a message channel.
public interface IMessageChannelAcknowledger<TMessage> where TMessage : class
Type Parameters
TMessageThe type of message handled by the channel.
- Extension Methods
Methods
AcknowledgeAsync(TMessage, CancellationToken)
Acknowledges successful processing of a message.
Task AcknowledgeAsync(TMessage message, CancellationToken cancellationToken)
Parameters
messageTMessageThe message to acknowledge.
cancellationTokenCancellationTokenA cancellation token to cancel the operation.
Returns
- Task
A task that represents the asynchronous acknowledge operation.
RejectAsync(TMessage, string, CancellationToken)
Rejects a message, potentially moving it to a dead letter queue.
Task RejectAsync(TMessage message, string reason, CancellationToken cancellationToken)
Parameters
messageTMessageThe message to reject.
reasonstringThe reason for rejection.
cancellationTokenCancellationTokenA cancellation token to cancel the operation.
Returns
- Task
A task that represents the asynchronous reject operation.