Table of Contents

Interface IMessageChannelSender<TMessage>

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Defines the send-side contract for a message channel.

public interface IMessageChannelSender<TMessage> where TMessage : class

Type Parameters

TMessage

The type of message handled by the channel.

Extension Methods

Methods

SendAsync(TMessage, CancellationToken)

Sends a message through the channel.

Task SendAsync(TMessage message, CancellationToken cancellationToken)

Parameters

message TMessage

The message to send.

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task

A task that represents the asynchronous send operation.

SendBatchAsync(IEnumerable<TMessage>, CancellationToken)

Sends a batch of messages through the channel.

Task SendBatchAsync(IEnumerable<TMessage> messages, CancellationToken cancellationToken)

Parameters

messages IEnumerable<TMessage>

The messages to send.

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task

A task that represents the asynchronous batch send operation.