Class DynamoDbOutboxOptions
Configuration options for the DynamoDB outbox store.
public sealed class DynamoDbOutboxOptions
- Inheritance
-
DynamoDbOutboxOptions
- Inherited Members
Remarks
Connection properties (ServiceUrl, Region, credentials) are in Connection.
This follows the AmazonDynamoDBConfig pattern of separating connection from table configuration.
Properties
Connection
Gets or sets the connection and credential options.
public DynamoDbOutboxConnectionOptions Connection { get; set; }
Property Value
CreateTableIfNotExists
Gets or sets a value indicating whether to create the table if it doesn't exist.
public bool CreateTableIfNotExists { get; set; }
Property Value
CreatedAtIndexName
Gets or sets the name of the Global Secondary Index (GSI) that orders pending messages by creation time within a partition.
[Required]
public string CreatedAtIndexName { get; set; }
Property Value
- string
Defaults to "ix_pk_createdAt".
Remarks
A DynamoDB Query against the base table is physically ordered by the sort key
(SortKeyAttribute, a message id) and cannot express "in creation order" directly —
unlike Cosmos DB and Firestore, which order by a strongly-consistent query. This GSI (HASH =
PartitionKeyAttribute, RANGE = createdAt) is what GetPendingAsync and
ClaimPendingAsync query instead, to keep the FIFO guarantee ICloudNativeOutboxStore
documents. A GSI is eventually consistent with the base table: a just-staged message may not appear
on it for a brief interval, which is a latency property (the row is durably present on the
strongly-consistent base table throughout), not a loss property. AWS documents GSI propagation as
typically completing within a fraction of a second under normal conditions, with no formal upper
bound.
DefaultTimeToLiveSeconds
Gets or sets the default time-to-live for published messages in seconds.
[Range(0, 2147483647)]
public int DefaultTimeToLiveSeconds { get; set; }
Property Value
- int
Defaults to 7 days (604800 seconds). Set to 0 to disable TTL.
EnableStreams
Gets or sets a value indicating whether to enable DynamoDB Streams on the table.
public bool EnableStreams { get; set; }
Property Value
LeaseTimeoutSeconds
Gets or sets how long a claim lease is held before it expires, in seconds.
[Range(1, 2147483647)]
public int LeaseTimeoutSeconds { get; set; }
Property Value
- int
Defaults to 120 seconds, matching the relational outbox providers.
Remarks
Only consulted by the atomic claim (ICloudNativeOutboxStoreClaim). A claimant that dies
mid-delivery releases its messages by letting this window elapse, so nothing has to detect the death
— but a claimant that is merely slow can also have a message taken from under it. Set this
above the maximum time a publish can take, and remember it bounds the duplicate window only up to
the clock skew between claimants.
MaxRetryAttempts
Gets or sets the maximum retry attempts.
[Range(0, 2147483647)]
public int MaxRetryAttempts { get; set; }
Property Value
- int
Defaults to 3.
PartitionKeyAttribute
Gets or sets the partition key attribute name.
[Required]
public string PartitionKeyAttribute { get; set; }
Property Value
- string
Defaults to "pk".
SortKeyAttribute
Gets or sets the sort key attribute name.
[Required]
public string SortKeyAttribute { get; set; }
Property Value
- string
Defaults to "sk".
TableName
Gets or sets the outbox table name.
[Required]
public string TableName { get; set; }
Property Value
- string
Defaults to "outbox".
TtlAttribute
Gets or sets the TTL attribute name.
[Required]
public string TtlAttribute { get; set; }
Property Value
- string
Defaults to "ttl".
Methods
GetRegionEndpoint()
Gets the AWS region endpoint.
public RegionEndpoint? GetRegionEndpoint()
Returns
- RegionEndpoint
The AWS region endpoint, or null if not configured.
Validate()
Validates the options.
public void Validate()
Exceptions
- InvalidOperationException
Thrown when required options are missing.