Class OutboxWriterExtensions
Extension methods for IOutboxWriter.
public static class OutboxWriterExtensions
- Inheritance
-
OutboxWriterExtensions
- Inherited Members
Methods
WriteScheduledAsync(IOutboxWriter, IDispatchMessage, string?, DateTimeOffset, CancellationToken)
Writes a message to the outbox for scheduled delivery.
[RequiresUnreferencedCode("Outbox stores serialize the message payload reflectively; supply JsonSerializerOptions with a source-generated resolver for trimming and AOT.")]
[RequiresDynamicCode("Outbox stores serialize the message payload reflectively; supply JsonSerializerOptions with a source-generated resolver for trimming and AOT.")]
public static ValueTask WriteScheduledAsync(this IOutboxWriter writer, IDispatchMessage message, string? destination, DateTimeOffset scheduledAt, CancellationToken cancellationToken)
Parameters
writerIOutboxWriterThe outbox writer.
messageIDispatchMessageThe message to stage.
destinationstringOptional destination/topic for the message.
scheduledAtDateTimeOffsetThe time at which the message should be delivered.
cancellationTokenCancellationTokenToken to monitor for cancellation.
Returns
- ValueTask
A task representing the write operation.
Exceptions
- ArgumentNullException
Thrown when
writerormessageis null.