Class RedisOutboxOptions
Configuration options for the Redis outbox store.
public sealed class RedisOutboxOptions
- Inheritance
-
RedisOutboxOptions
- Inherited Members
Properties
AbortOnConnectFail
Gets or sets a value indicating whether to abort on connect failure.
public bool AbortOnConnectFail { get; set; }
Property Value
ConnectTimeoutMs
Gets or sets the connection timeout in milliseconds.
[Range(1, 2147483647)]
public int ConnectTimeoutMs { get; set; }
Property Value
ConnectionString
Gets or sets the Redis connection string.
[Required]
public string ConnectionString { get; set; }
Property Value
DatabaseId
Gets or sets the Redis database ID to use.
[Range(0, 2147483647)]
public int DatabaseId { get; set; }
Property Value
FailureBackoffFloorSeconds
Gets or sets the failure-backoff floor F, in seconds: after a plain MarkFailedAsync, the message
becomes re-claimable only after F elapses (its NextAttemptAt gate). This bounds the plain-path
retry cadence so it cannot hot-loop the drain, while the message stays eventually re-claimable
(at-least-once). F must exceed the drain polling interval; the validator enforces that cross-options invariant.
[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).
KeyPrefix
Gets or sets the key prefix for outbox entries.
[Required]
public string KeyPrefix { get; set; }
Property Value
Remarks
Keys are formatted as: {KeyPrefix}:msg:{messageId} for message data and {KeyPrefix}:idx:* for various indexes (priority, scheduled, failed).
LeaseTimeoutSeconds
Gets or sets the lease (visibility) timeout in seconds for a claimed message.
[Range(1, 2147483647)]
public int LeaseTimeoutSeconds { get; set; }
Property Value
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 (crash-reclaim / no message loss). Defaults to 300 seconds (5 minutes); set generously above the expected per-message delivery time to avoid premature re-claim of in-flight work.
Password
Gets or sets the password for Redis authentication.
public string? Password { get; set; }
Property Value
ProcessorId
Gets or sets the identifier recorded as the lease owner of a claimed message. Owner-checked completions use this same identifier.
public string? ProcessorId { get; set; }
Property Value
Remarks
When null, empty or whitespace, an immutable per-store identifier is generated at construction. Use a different identifier for each independent processor sharing a key prefix. The atomic claim script guarantees disjoint claims; this identifier also prevents a different owner from retiring an active lease. It is not a fencing token or a per-acquisition generation.
SentMessageTtlSeconds
Gets or sets the default time to live for sent messages in seconds.
[Range(0, 2147483647)]
public int SentMessageTtlSeconds { get; set; }
Property Value
Remarks
Set to 0 for no expiration. Defaults to 7 days (604800 seconds). Only applies to messages in Sent status.
SyncTimeoutMs
Gets or sets the sync operation timeout in milliseconds.
[Range(1, 2147483647)]
public int SyncTimeoutMs { get; set; }
Property Value
UseSsl
Gets or sets a value indicating whether to use SSL/TLS.
public bool UseSsl { get; set; }
Property Value
Methods
Validate()
Validates the options and throws if invalid.
public void Validate()
Exceptions
- InvalidOperationException
Thrown when required options are missing.