Table of Contents

Class OutboxOptions

Namespace
Excalibur.Outbox
Assembly
Excalibur.Outbox.dll

Immutable, resolved configuration for the outbox pattern.

public sealed class OutboxOptions
Inheritance
OutboxOptions
Inherited Members

Examples

// Configure:
services.AddExcalibur(excalibur => excalibur.AddOutbox(outbox => outbox
    .UseSqlServer(sql => sql.ConnectionString(connectionString))
    .WithProcessing(processing => processing
        .BatchSize(1000)
        .PollingInterval(TimeSpan.FromMilliseconds(100))
        .EnableParallelProcessing(maxDegreeOfParallelism: 8))
    .EnableBackgroundProcessing()));

// Read back the resolved settings:
var options = serviceProvider.GetRequiredService<OutboxOptions>();
logger.LogInformation("Outbox batch size: {BatchSize}", options.BatchSize);

Remarks

This type is produced by the framework from the outbox builder, not constructed by consumers. Configure the outbox through the builder callback on AddOutbox; resolve this type from dependency injection when you need to read the builder's configured defaults. Explicit configuration of delivery/background options or a consumer backoff calculator can override those defaults; inspect the corresponding resolved options when reporting the processor's effective settings.

Properties

BatchSize

Gets the maximum number of messages to process in a single batch.

public int BatchSize { get; }

Property Value

int

The batch size.

EnableBackgroundProcessing

Gets a value indicating whether background processing is enabled.

public bool EnableBackgroundProcessing { get; }

Property Value

bool

true if background processing is enabled; otherwise, false.

EnableParallelProcessing

Gets a value indicating whether parallel processing of messages is enabled.

public bool EnableParallelProcessing { get; }

Property Value

bool

true if parallel processing is enabled; otherwise, false.

MaxDegreeOfParallelism

Gets the maximum degree of parallelism when parallel processing is enabled.

public int MaxDegreeOfParallelism { get; }

Property Value

int

The maximum degree of parallelism.

PollingInterval

Gets the interval between processing cycles.

public TimeSpan PollingInterval { get; }

Property Value

TimeSpan

The polling interval.

Preset

Gets the preset that was used to create these options.

public OutboxPreset Preset { get; }

Property Value

OutboxPreset

The preset type.

ProcessorId

Gets the unique identifier for this processor instance.

public string? ProcessorId { get; }

Property Value

string

The processor ID, or null to auto-generate.

Remarks

When set (e.g. via WithProcessorId), this becomes the SQL Server outbox lease owner (SqlServerOutboxOptions.ProcessorId → the persisted LeasedBy), replacing the auto-unique {MachineName}:{ProcessId} default. Concurrency safety does not depend on it — SKIP LOCKED row-claiming prevents double-claims and stale-lease reclamation is age-based — so a shared value is row-safe; if you set an explicit id, ensuring it is unique per host (where you want distinct lease ownership) is your responsibility, exactly as it was for the default you replaced.

Retry

Gets the retry options for failed message processing.

public OutboxRetryOptions Retry { get; }

Property Value

OutboxRetryOptions

The retry options.