Class MartenOutboxStoreOptions
Configuration options for the Marten-based outbox store.
public sealed class MartenOutboxStoreOptions
- Inheritance
-
MartenOutboxStoreOptions
- Inherited Members
Remarks
The Marten outbox composes an IDocumentSession per operation from the consumer-supplied
IDocumentStore. Connection, schema, and serialization are configured on the Marten store
itself (via services.AddMarten(...)); these options cover only outbox-specific behavior.
Properties
ClaimTimeout
Gets or sets how long a dispatcher's claim on a message is honoured before another may take it.
public TimeSpan ClaimTimeout { get; set; }
Property Value
- TimeSpan
The claim duration. Must be positive. Defaults to 5 minutes.
Remarks
A dispatcher that crashes between claiming a message and marking it sent leaves the claim behind. Once this elapses another dispatcher reclaims the message, so a crash costs a delay rather than a permanently stranded message. Set it comfortably above the longest expected send: a value shorter than that lets a second dispatcher take a message the first is still working on, which turns the at-least-once delivery this store provides into duplicate delivery far more often than a crash would.
ClaimsSchemaName
Gets or sets the schema holding the claim table.
public string ClaimsSchemaName { get; set; }
Property Value
- string
The schema name. Defaults to
public.
ClaimsTableName
Gets or sets the name of the claim table.
public string ClaimsTableName { get; set; }
Property Value
- string
The table name. Defaults to
excalibur_outbox_claims.
Remarks
The claims live in a table this store owns rather than in the Marten document itself. Marten keeps
a document's fields inside a jsonb column whose property names come from the serializer the
CONSUMER configured on their own IDocumentStore — so SQL reaching into that document would
silently stop matching under a different casing convention. A table this store defines has columns
it controls, and the claim is expressible as a single atomic statement against them.
CleanupBatchSize
Gets or sets the maximum number of messages returned by a single cleanup pass.
[Range(1, 2147483647)]
public int CleanupBatchSize { get; set; }
Property Value
- int
The cleanup batch size. Must be greater than zero. Defaults to 500.
DefaultRetentionPeriod
Gets or sets the default retention period after which sent messages are eligible for cleanup.
public TimeSpan DefaultRetentionPeriod { get; set; }
Property Value
- TimeSpan
The retention period. Must be positive. Defaults to 7 days.
FailureBackoffFloorSeconds
Gets or sets the failure-backoff floor F, in seconds: after MarkFailedAsync(string, string, int, CancellationToken) records a plain failure, the message becomes re-claimable only once F has elapsed from the failure instant. This bounds the retry cadence of the plain path so it cannot hot-loop the drain against a persistently failing destination, while the message stays eventually re-claimable rather than being dropped. F must exceed the drain polling interval; the validator enforces that at startup.
public int FailureBackoffFloorSeconds { get; set; }
Property Value
- int
The failure-backoff floor in seconds. Defaults to 30 (uniform across the outbox family).