Table of Contents

Interface ISendTransport

Namespace
MassTransit.Transports
Assembly
MassTransit.Abstractions.dll
public interface ISendTransport : ISendObserverConnector
Inherited Members

Methods

CreateSendContext<T>(T, IPipe<SendContext<T>>, CancellationToken)

Task<SendContext<T>> CreateSendContext<T>(T message, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken) where T : class

Parameters

message T
pipe IPipe<SendContext<T>>
cancellationToken CancellationToken

Returns

Task<SendContext<T>>

Type Parameters

T

Send<T>(T, IPipe<SendContext<T>>, CancellationToken)

Send a message to the transport. The transport creates the OldSendContext, and calls back to allow the context to be modified to customize the message delivery. The transport specifies the defaults for the message as configured, and then allows the caller to modify the send context to include the required settings (durable, mandatory, etc.).

Task Send<T>(T message, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken) where T : class

Parameters

message T
pipe IPipe<SendContext<T>>

The pipe invoked when sending a message, to do extra stuff

cancellationToken CancellationToken

Cancel the send operation (if possible)

Returns

Task

The task which is completed once the Send is acknowledged by the broker

Type Parameters

T

The message type