Table of Contents

Class SagaOptions

Namespace
Excalibur.Saga
Assembly
Excalibur.Saga.dll

Configuration options for the saga pattern.

public sealed class SagaOptions
Inheritance
SagaOptions
Inherited Members

Remarks

Optimistic concurrency is always enforced: every saga store performs a version-gated write and throws ConcurrencyException on a stale-version save. It is not configurable.

Properties

CleanupInterval

Gets or sets the interval between cleanup cycles.

public TimeSpan CleanupInterval { get; set; }

Property Value

TimeSpan

The cleanup interval, default is 1 hour.

DefaultTimeout

Gets or sets the default timeout for saga operations.

public TimeSpan DefaultTimeout { get; set; }

Property Value

TimeSpan

The default timeout, default is 30 minutes.

EnableAutomaticCleanup

Gets or sets whether to enable automatic cleanup of completed sagas.

public bool EnableAutomaticCleanup { get; set; }

Property Value

bool

true to enable automatic periodic cleanup; default false.

Remarks

When true, a hosted background service periodically invokes the purge primitive PurgeCompletedBeforeAsync(DateTimeOffset, CancellationToken) on CleanupInterval, deleting completed sagas older than SagaRetentionPeriod. When false (the default) no background purge runs; the purge primitive remains available to call from your own scheduler. The configured saga store must support purge-by-age.

MaxAttempts

Gets or sets the total local attempt ceiling for a saga event, including the initial attempt.

[Range(0, 100)]
public int MaxAttempts { get; set; }

Property Value

int

The total local attempt ceiling, default is 3.

Remarks

Further attempts require a transient or uncertain shared failure classification. Permanent, poison and unknown failures stop without automatic replay; caller cancellation is not retried. Values below one still permit one initial attempt.

MaxConcurrency

Gets or sets the maximum number of concurrent saga operations.

[Range(1, 2147483647)]
public int MaxConcurrency { get; set; }

Property Value

int

The maximum concurrency, default is 10.

RetryDelay

Gets or sets the delay between retry attempts.

public TimeSpan RetryDelay { get; set; }

Property Value

TimeSpan

The retry delay, default is 1 minute.

SagaRetentionPeriod

Gets or sets the retention period for completed sagas before cleanup.

public TimeSpan SagaRetentionPeriod { get; set; }

Property Value

TimeSpan

The saga retention period, default is 30 days.