Table of Contents

Interface SendContext

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

Unlike the old world, the send context is returned from the endpoint and used to configure the message sending. That way the message is captured by the endpoint and then any configuration is done at the higher level.

public interface SendContext : PipeContext
Inherited Members
Extension Methods

Properties

BodyLength

After serialization, should return the length of the message body

long? BodyLength { get; }

Property Value

long?

ContentType

ContentType? ContentType { get; set; }

Property Value

ContentType

ConversationId

Guid? ConversationId { get; set; }

Property Value

Guid?

CorrelationId

Guid? CorrelationId { get; set; }

Property Value

Guid?

Delay

If specified, the message delivery will be delayed by the transport (if supported)

TimeSpan? Delay { get; set; }

Property Value

TimeSpan?

DestinationAddress

Uri? DestinationAddress { get; set; }

Property Value

Uri

Durable

True if the message should be persisted to disk to survive a broker restart

bool Durable { get; set; }

Property Value

bool

FaultAddress

Uri? FaultAddress { get; set; }

Property Value

Uri

Headers

SendHeaders Headers { get; }

Property Value

SendHeaders

InitiatorId

Guid? InitiatorId { get; set; }

Property Value

Guid?

MessageId

Guid? MessageId { get; set; }

Property Value

Guid?

RequestId

Guid? RequestId { get; set; }

Property Value

Guid?

ResponseAddress

Uri? ResponseAddress { get; set; }

Property Value

Uri

ScheduledMessageId

Guid? ScheduledMessageId { get; set; }

Property Value

Guid?

SentTime

DateTime? SentTime { get; }

Property Value

DateTime?

Serialization

The endpoint configured serialization collection

ISerialization Serialization { get; set; }

Property Value

ISerialization

Serializer

The serializer to use when serializing the message to the transport

IMessageSerializer Serializer { get; set; }

Property Value

IMessageSerializer

SourceAddress

Uri? SourceAddress { get; set; }

Property Value

Uri

TimeToLive

TimeSpan? TimeToLive { get; set; }

Property Value

TimeSpan?

Methods

CreateProxy<T>(T)

Create a send context proxy with the new message type

SendContext<T> CreateProxy<T>(T message) where T : class

Parameters

message T

Returns

SendContext<T>

Type Parameters

T