Table of Contents

Interface IMessageScheduler

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

A message scheduler is able to schedule a message for delivery.

public interface IMessageScheduler
Extension Methods

Methods

CancelScheduledPublish(Type, Guid)

Cancel a scheduled publish, using the tokenId. The messageType is used to determine the destinationAddress.

Task CancelScheduledPublish(Type messageType, Guid tokenId)

Parameters

messageType Type
tokenId Guid

The tokenId of the scheduled message

Returns

Task

CancelScheduledPublish<T>(Guid)

Cancel a scheduled publish, using the tokenId. The message type T is used to determine the destinationAddress.

Task CancelScheduledPublish<T>(Guid tokenId) where T : class

Parameters

tokenId Guid

The tokenId of the scheduled message

Returns

Task

Type Parameters

T

CancelScheduledSend(Uri, Guid)

Cancel a scheduled message by TokenId

Task CancelScheduledSend(Uri destinationAddress, Guid tokenId)

Parameters

destinationAddress Uri

The destination address of the scheduled message

tokenId Guid

The tokenId of the scheduled message

Returns

Task

SchedulePublish(DateTime, object, IPipe<SendContext>, CancellationToken)

Sends an object as a message, using the message type specified. If the object cannot be cast to the specified message type, an exception will be thrown.

Task<ScheduledMessage> SchedulePublish(DateTime scheduledTime, object message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

SchedulePublish(DateTime, object, CancellationToken)

Sends an object as a message, using the type of the message instance.

Task<ScheduledMessage> SchedulePublish(DateTime scheduledTime, object message, CancellationToken cancellationToken = default)

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

SchedulePublish(DateTime, object, Type, IPipe<SendContext>, CancellationToken)

Sends an object as a message, using the message type specified. If the object cannot be cast to the specified message type, an exception will be thrown.

Task<ScheduledMessage> SchedulePublish(DateTime scheduledTime, object message, Type messageType, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

messageType Type

The type of the message (use message.GetType() if desired)

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

SchedulePublish(DateTime, object, Type, CancellationToken)

Sends an object as a message, using the message type specified. If the object cannot be cast to the specified message type, an exception will be thrown.

Task<ScheduledMessage> SchedulePublish(DateTime scheduledTime, object message, Type messageType, CancellationToken cancellationToken = default)

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

messageType Type

The type of the message (use message.GetType() if desired)

cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

SchedulePublish<T>(DateTime, object, IPipe<SendContext<T>>, CancellationToken)

Sends an interface message, initializing the properties of the interface using the anonymous object specified

Task<ScheduledMessage<T>> SchedulePublish<T>(DateTime scheduledTime, object values, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

values object

The property values to initialize on the interface

pipe IPipe<SendContext<T>>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The interface type to send

SchedulePublish<T>(DateTime, object, IPipe<SendContext>, CancellationToken)

Sends an interface message, initializing the properties of the interface using the anonymous object specified

Task<ScheduledMessage<T>> SchedulePublish<T>(DateTime scheduledTime, object values, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

values object

The property values to initialize on the interface

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The interface type to send

SchedulePublish<T>(DateTime, object, CancellationToken)

Sends an interface message, initializing the properties of the interface using the anonymous object specified

Task<ScheduledMessage<T>> SchedulePublish<T>(DateTime scheduledTime, object values, CancellationToken cancellationToken = default) where T : class

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

values object

The property values to initialize on the interface

cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The interface type to send

SchedulePublish<T>(DateTime, T, IPipe<SendContext<T>>, CancellationToken)

Send a message

Task<ScheduledMessage<T>> SchedulePublish<T>(DateTime scheduledTime, T message, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

message T

The message

pipe IPipe<SendContext<T>>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The message type

SchedulePublish<T>(DateTime, T, IPipe<SendContext>, CancellationToken)

Send a message

Task<ScheduledMessage<T>> SchedulePublish<T>(DateTime scheduledTime, T message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

message T

The message

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The message type

SchedulePublish<T>(DateTime, T, CancellationToken)

Send a message

Task<ScheduledMessage<T>> SchedulePublish<T>(DateTime scheduledTime, T message, CancellationToken cancellationToken = default) where T : class

Parameters

scheduledTime DateTime

The time at which the message should be delivered to the queue

message T

The message

cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The message type

ScheduleSend(Uri, DateTime, object, IPipe<SendContext>, CancellationToken)

Sends an object as a message, using the message type specified. If the object cannot be cast to the specified message type, an exception will be thrown.

Task<ScheduledMessage> ScheduleSend(Uri destinationAddress, DateTime scheduledTime, object message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

ScheduleSend(Uri, DateTime, object, CancellationToken)

Sends an object as a message, using the type of the message instance.

Task<ScheduledMessage> ScheduleSend(Uri destinationAddress, DateTime scheduledTime, object message, CancellationToken cancellationToken = default)

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

ScheduleSend(Uri, DateTime, object, Type, IPipe<SendContext>, CancellationToken)

Sends an object as a message, using the message type specified. If the object cannot be cast to the specified message type, an exception will be thrown.

Task<ScheduledMessage> ScheduleSend(Uri destinationAddress, DateTime scheduledTime, object message, Type messageType, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

messageType Type

The type of the message (use message.GetType() if desired)

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

ScheduleSend(Uri, DateTime, object, Type, CancellationToken)

Sends an object as a message, using the message type specified. If the object cannot be cast to the specified message type, an exception will be thrown.

Task<ScheduledMessage> ScheduleSend(Uri destinationAddress, DateTime scheduledTime, object message, Type messageType, CancellationToken cancellationToken = default)

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

message object

The message object

messageType Type

The type of the message (use message.GetType() if desired)

cancellationToken CancellationToken

Returns

Task<ScheduledMessage>

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

ScheduleSend<T>(Uri, DateTime, object, IPipe<SendContext<T>>, CancellationToken)

Sends an interface message, initializing the properties of the interface using the anonymous object specified

Task<ScheduledMessage<T>> ScheduleSend<T>(Uri destinationAddress, DateTime scheduledTime, object values, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

values object

The property values to initialize on the interface

pipe IPipe<SendContext<T>>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The interface type to send

ScheduleSend<T>(Uri, DateTime, object, IPipe<SendContext>, CancellationToken)

Sends an interface message, initializing the properties of the interface using the anonymous object specified

Task<ScheduledMessage<T>> ScheduleSend<T>(Uri destinationAddress, DateTime scheduledTime, object values, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

values object

The property values to initialize on the interface

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The interface type to send

ScheduleSend<T>(Uri, DateTime, object, CancellationToken)

Sends an interface message, initializing the properties of the interface using the anonymous object specified

Task<ScheduledMessage<T>> ScheduleSend<T>(Uri destinationAddress, DateTime scheduledTime, object values, CancellationToken cancellationToken = default) where T : class

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

values object

The property values to initialize on the interface

cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The interface type to send

ScheduleSend<T>(Uri, DateTime, T, IPipe<SendContext<T>>, CancellationToken)

Send a message

Task<ScheduledMessage<T>> ScheduleSend<T>(Uri destinationAddress, DateTime scheduledTime, T message, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

message T

The message

pipe IPipe<SendContext<T>>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The message type

ScheduleSend<T>(Uri, DateTime, T, IPipe<SendContext>, CancellationToken)

Send a message

Task<ScheduledMessage<T>> ScheduleSend<T>(Uri destinationAddress, DateTime scheduledTime, T message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

message T

The message

pipe IPipe<SendContext>
cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The message type

ScheduleSend<T>(Uri, DateTime, T, CancellationToken)

Send a message

Task<ScheduledMessage<T>> ScheduleSend<T>(Uri destinationAddress, DateTime scheduledTime, T message, CancellationToken cancellationToken = default) where T : class

Parameters

destinationAddress Uri

The destination address where the schedule message should be sent

scheduledTime DateTime

The time at which the message should be delivered to the queue

message T

The message

cancellationToken CancellationToken

Returns

Task<ScheduledMessage<T>>

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

Type Parameters

T

The message type