Table of Contents

Class OutboxWriterExtensions

Namespace
Excalibur.Dispatch.Outbox
Assembly
Excalibur.Dispatch.Abstractions.dll

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

writer IOutboxWriter

The outbox writer.

message IDispatchMessage

The message to stage.

destination string

Optional destination/topic for the message.

scheduledAt DateTimeOffset

The time at which the message should be delivered.

cancellationToken CancellationToken

Token to monitor for cancellation.

Returns

ValueTask

A task representing the write operation.

Exceptions

ArgumentNullException

Thrown when writer or message is null.