Class ElasticsearchOutboxOptions
- Namespace
- Excalibur.Outbox.ElasticSearch
- Assembly
- Excalibur.Outbox.ElasticSearch.dll
Configuration options for the Elasticsearch outbox store.
public sealed class ElasticsearchOutboxOptions
- Inheritance
-
ElasticsearchOutboxOptions
- Inherited Members
Properties
DefaultBatchSize
Gets or sets the default batch size for retrieving unsent messages.
[Range(1, 10000)]
public int DefaultBatchSize { get; set; }
Property Value
- int
The default batch size. Defaults to 100.
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 (its NextAttemptAt gate). 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 cross-options invariant at startup.
[Range(1, 2147483647)]
public int FailureBackoffFloorSeconds { get; set; }
Property Value
- int
The failure-backoff floor in seconds. Defaults to 30 (uniform across the outbox family).
IndexName
Gets or sets the index name for outbox entries.
[Required]
public string IndexName { get; set; }
Property Value
- string
The index name for outbox entries.
LeaseTimeoutSeconds
Gets or sets the lease (visibility) timeout in seconds for a claimed message.
[Range(1, 2147483647)]
public int LeaseTimeoutSeconds { get; set; }
Property Value
- int
The lease timeout in seconds. Defaults to 300 (5 minutes).
Remarks
When a poller claims staged messages for delivery, each claimed message is leased for this duration: it is hidden from other pollers (disjoint claim) until either it reaches a terminal state (sent/failed/dead-lettered, which clears the lease) or the lease expires. An expired lease makes the message claimable again, so a poller that crashes mid-delivery cannot strand a message permanently. Set this comfortably longer than the slowest expected delivery: if the lease expires while a delivery is still in flight, another poller may claim the same message and the consumer observes a duplicate. Delivery is at-least-once, so handlers must be idempotent regardless.
ProcessorId
Gets or sets the identifier recorded as the owner of a claimed message's lease.
public string? ProcessorId { get; set; }
Property Value
Remarks
Used for diagnostics — which poller currently holds a message. Claim disjointness does not depend on this value: it is enforced by the store's compare-and-swap on the document's optimistic concurrency tokens, so two pollers sharing an identifier still receive disjoint batches.
RefreshPolicy
Gets or sets the refresh policy applied after index WRITE operations.
public ElasticsearchRefreshPolicy RefreshPolicy { get; set; }
Property Value
- ElasticsearchRefreshPolicy
The refresh policy. Defaults to WaitFor, which makes a write visible to the next search without forcing an immediate refresh.
Remarks
This is a throughput knob, and it cannot make a read incorrect. It governs when a write becomes searchable; it does not govern what a read reports. The statistics surface refreshes at the point of READING for exactly that reason, so an operator watching a failure count is told the truth whatever this is set to.
The type is an enumeration rather than a string deliberately. As a string it was compared with ordinal, case-sensitive equality against two literals, so every value that matched neither -- a typo, a differently-cased spelling, a value from another vendor's vocabulary -- silently selected the fall-through policy instead of being refused. A misconfiguration that reads as a valid choice is the failure this type makes inexpressible: the compiler now rejects what the comparison used to guess at.