Class ConsumeContextSchedulerExtensions
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
public static class ConsumeContextSchedulerExtensions
- Inheritance
-
ConsumeContextSchedulerExtensions
- Inherited Members
Methods
ScheduleSend(ConsumeContext, 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.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, object message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
messageobjectThe message object
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend(ConsumeContext, Uri, DateTime, object, CancellationToken)
Sends an object as a message, using the type of the message instance.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, object message, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
messageobjectThe message object
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend(ConsumeContext, 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.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, object message, Type messageType, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
messageobjectThe message object
messageTypeTypeThe type of the message (use message.GetType() if desired)
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend(ConsumeContext, 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.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, object message, Type messageType, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
messageobjectThe message object
messageTypeTypeThe type of the message (use message.GetType() if desired)
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend(ConsumeContext, Uri, TimeSpan, 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.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, object message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
messageobjectThe message object
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend(ConsumeContext, Uri, TimeSpan, object, CancellationToken)
Sends an object as a message, using the type of the message instance.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, object message, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
messageobjectThe message object
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend(ConsumeContext, Uri, TimeSpan, 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.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, object message, Type messageType, IPipe<SendContext> pipe, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
messageobjectThe message object
messageTypeTypeThe type of the message (use message.GetType() if desired)
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend(ConsumeContext, Uri, TimeSpan, 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.
public static Task<ScheduledMessage> ScheduleSend(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, object message, Type messageType, CancellationToken cancellationToken = default)
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
messageobjectThe message object
messageTypeTypeThe type of the message (use message.GetType() if desired)
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage>
The task which is completed once the Send is acknowledged by the broker
ScheduleSend<T>(ConsumeContext, Uri, DateTime, object, IPipe<SendContext<T>>, CancellationToken)
Sends an interface message, initializing the properties of the interface using the anonymous object specified
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, object values, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
valuesobjectThe property values to initialize on the interface
pipeIPipe<SendContext<T>>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe interface type to send
ScheduleSend<T>(ConsumeContext, Uri, DateTime, object, IPipe<SendContext>, CancellationToken)
Sends an interface message, initializing the properties of the interface using the anonymous object specified
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, object values, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
valuesobjectThe property values to initialize on the interface
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe interface type to send
ScheduleSend<T>(ConsumeContext, Uri, DateTime, object, CancellationToken)
Sends an interface message, initializing the properties of the interface using the anonymous object specified
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, object values, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
valuesobjectThe property values to initialize on the interface
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe interface type to send
ScheduleSend<T>(ConsumeContext, Uri, DateTime, T, IPipe<SendContext<T>>, CancellationToken)
Send a message
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, T message, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
messageTThe message
pipeIPipe<SendContext<T>>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe message type
ScheduleSend<T>(ConsumeContext, Uri, DateTime, T, IPipe<SendContext>, CancellationToken)
Send a message
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, T message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
messageTThe message
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe message type
ScheduleSend<T>(ConsumeContext, Uri, DateTime, T, CancellationToken)
Send a message
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, T message, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
scheduledTimeDateTimeThe time at which the message should be delivered to the queue
messageTThe message
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe message type
ScheduleSend<T>(ConsumeContext, Uri, TimeSpan, object, IPipe<SendContext<T>>, CancellationToken)
Sends an interface message, initializing the properties of the interface using the anonymous object specified
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, object values, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
valuesobjectThe property values to initialize on the interface
pipeIPipe<SendContext<T>>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe interface type to send
ScheduleSend<T>(ConsumeContext, Uri, TimeSpan, object, IPipe<SendContext>, CancellationToken)
Sends an interface message, initializing the properties of the interface using the anonymous object specified
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, object values, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
valuesobjectThe property values to initialize on the interface
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe interface type to send
ScheduleSend<T>(ConsumeContext, Uri, TimeSpan, object, CancellationToken)
Sends an interface message, initializing the properties of the interface using the anonymous object specified
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, object values, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
valuesobjectThe property values to initialize on the interface
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe interface type to send
ScheduleSend<T>(ConsumeContext, Uri, TimeSpan, T, IPipe<SendContext<T>>, CancellationToken)
Send a message
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, T message, IPipe<SendContext<T>> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
messageTThe message
pipeIPipe<SendContext<T>>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe message type
ScheduleSend<T>(ConsumeContext, Uri, TimeSpan, T, IPipe<SendContext>, CancellationToken)
Send a message
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, T message, IPipe<SendContext> pipe, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
messageTThe message
pipeIPipe<SendContext>cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe message type
ScheduleSend<T>(ConsumeContext, Uri, TimeSpan, T, CancellationToken)
Send a message
public static Task<ScheduledMessage<T>> ScheduleSend<T>(this ConsumeContext context, Uri destinationAddress, TimeSpan delay, T message, CancellationToken cancellationToken = default) where T : class
Parameters
contextConsumeContextThe consume context
destinationAddressUriThe destination address where the schedule message should be sent
delayTimeSpanThe time at which the message should be delivered to the queue
messageTThe message
cancellationTokenCancellationToken
Returns
- Task<ScheduledMessage<T>>
The task which is completed once the Send is acknowledged by the broker
Type Parameters
TThe message type