Table of Contents

Interface ITransportAdapter

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

Adapter interface that routes transport messages through the dispatcher pipeline rather than directly to handlers, ensuring all messages flow through IDispatcher.

public interface ITransportAdapter
Extension Methods

Properties

IsRunning

Gets a value indicating whether the adapter is currently running.

bool IsRunning { get; }

Property Value

bool

true if the adapter is running; otherwise, false.

Name

Gets the unique name of this transport adapter.

string Name { get; }

Property Value

string

The adapter identifier.

TransportType

Gets the transport type this adapter handles.

string TransportType { get; }

Property Value

string

The transport type managed by the adapter.

Methods

ReceiveAsync(object, IDispatcher, CancellationToken)

Receives a message from the transport and routes it through the dispatcher.

Task<IMessageResult> ReceiveAsync(object transportMessage, IDispatcher dispatcher, CancellationToken cancellationToken)

Parameters

transportMessage object

The raw transport message.

dispatcher IDispatcher

The dispatcher to route through.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IMessageResult>

The result of message processing.

SendAsync(IDispatchMessage, string, IMessageContext, CancellationToken)

Sends a message through the transport after processing.

Task SendAsync(IDispatchMessage message, string destination, IMessageContext context, CancellationToken cancellationToken)

Parameters

message IDispatchMessage

The message to send.

destination string

The destination endpoint.

context IMessageContext

The message context containing correlation, tenant, and other propagation data.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

Task representing the send operation.