Table of Contents

Class TimeSpanSchedulePublishExtensions

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll
public static class TimeSpanSchedulePublishExtensions
Inheritance
TimeSpanSchedulePublishExtensions
Inherited Members

Methods

SchedulePublish(IMessageScheduler, TimeSpan, object, IPipe<SendContext>, CancellationToken)

Publishes 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.

public static Task<ScheduledMessage> SchedulePublish(this IMessageScheduler scheduler, TimeSpan delay, object message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

SchedulePublish(IMessageScheduler, TimeSpan, object, CancellationToken)

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

public static Task<ScheduledMessage> SchedulePublish(this IMessageScheduler scheduler, TimeSpan delay, object message, CancellationToken cancellationToken = default)

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

SchedulePublish(IMessageScheduler, TimeSpan, object, Type, IPipe<SendContext>, CancellationToken)

Publishes 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.

public static Task<ScheduledMessage> SchedulePublish(this IMessageScheduler scheduler, TimeSpan delay, object message, Type messageType, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

SchedulePublish(IMessageScheduler, TimeSpan, object, Type, CancellationToken)

Publishes 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.

public static Task<ScheduledMessage> SchedulePublish(this IMessageScheduler scheduler, TimeSpan delay, object message, Type messageType, CancellationToken cancellationToken = default)

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

SchedulePublish<T>(IMessageScheduler, TimeSpan, object, IPipe<SendContext<T>>, CancellationToken)

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

public static Task<ScheduledMessage<T>> SchedulePublish<T>(this IMessageScheduler scheduler, TimeSpan delay, object values, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

Type Parameters

T

The interface type to send

SchedulePublish<T>(IMessageScheduler, TimeSpan, object, IPipe<SendContext>, CancellationToken)

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

public static Task<ScheduledMessage<T>> SchedulePublish<T>(this IMessageScheduler scheduler, TimeSpan delay, object values, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

Type Parameters

T

The interface type to send

SchedulePublish<T>(IMessageScheduler, TimeSpan, object, CancellationToken)

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

public static Task<ScheduledMessage<T>> SchedulePublish<T>(this IMessageScheduler scheduler, TimeSpan delay, object values, CancellationToken cancellationToken = default) where T : class

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

Type Parameters

T

The interface type to send

SchedulePublish<T>(IMessageScheduler, TimeSpan, T, IPipe<SendContext<T>>, CancellationToken)

Publish a message

public static Task<ScheduledMessage<T>> SchedulePublish<T>(this IMessageScheduler scheduler, TimeSpan delay, T message, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

Type Parameters

T

The message type

SchedulePublish<T>(IMessageScheduler, TimeSpan, T, IPipe<SendContext>, CancellationToken)

Publish a message

public static Task<ScheduledMessage<T>> SchedulePublish<T>(this IMessageScheduler scheduler, TimeSpan delay, T message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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 Publish is acknowledged by the broker

Type Parameters

T

The message type

SchedulePublish<T>(IMessageScheduler, TimeSpan, T, CancellationToken)

Publish a message

public static Task<ScheduledMessage<T>> SchedulePublish<T>(this IMessageScheduler scheduler, TimeSpan delay, T message, CancellationToken cancellationToken = default) where T : class

Parameters

scheduler IMessageScheduler

The message scheduler

delay TimeSpan

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