Table of Contents

Class ExactlyOnceOptions

Namespace
Excalibur.Dispatch.Options.Delivery
Assembly
Excalibur.Dispatch.dll

Options that compose the outbox, inbox, and deduplication primitives into a single turnkey exactly-once messaging registration (AddExactlyOnceMessaging), with a documented delivery-guarantee boundary.

public sealed class ExactlyOnceOptions
Inheritance
ExactlyOnceOptions
Inherited Members
Extension Methods

Remarks

Guarantee boundary. The delivery guarantee depends on the registered inbox store's capabilities:

  • Exactly-once when the inbox store implements ITransactionalInboxStore (it processes the message and marks it processed inside a single enlisting transaction, so a crash can neither drop nor double-apply the effect).
  • At-least-once with durable deduplication otherwise: the atomic claim protocol (IClaimableInboxStore) suppresses concurrent duplicates and the dedup store suppresses redelivered ones for DeduplicationTimeToLive, but a crash between handler success and the processed-mark redelivers — so handlers MUST be idempotent.

Set RequireTransactionalExactlyOnce to fail fast at startup unless the inbox store can provide the transactional guarantee, rather than silently running with the weaker (at-least-once) contract.

Properties

DeduplicationTimeToLive

Gets or sets the time-to-live for deduplication entries. When null (the default), the value is tied to the inbox message time-to-live (DefaultMessageTimeToLive) so a message cannot be re-admitted by the inbox after its dedup record has expired (which would defeat suppression). Set it explicitly only to override that coupling.

public TimeSpan? DeduplicationTimeToLive { get; set; }

Property Value

TimeSpan?

The deduplication retention window, or null to track the inbox TTL.

RequireTransactionalExactlyOnce

Gets or sets a value indicating whether registration requires an inbox store that supports transactional exactly-once processing (ITransactionalInboxStore). When true, startup fails fast if the registered store cannot provide it; when false (the default), a non-transactional store is accepted under the documented at-least-once-with-deduplication boundary.

public bool RequireTransactionalExactlyOnce { get; set; }

Property Value

bool

true to enforce transactional exactly-once at startup; otherwise false.

Methods

Validate(ExactlyOnceOptions)

Validates the options, returning an error message describing the first failure, or null when the options are valid.

public static string? Validate(ExactlyOnceOptions options)

Parameters

options ExactlyOnceOptions

The options to validate.

Returns

string

An error message, or null if valid.