Table of Contents

Class DynamoDbEventStoreOptions

Namespace
Excalibur.EventSourcing.DynamoDb
Assembly
Excalibur.EventSourcing.DynamoDb.dll

Configuration options for the DynamoDB event store.

public sealed class DynamoDbEventStoreOptions
Inheritance
DynamoDbEventStoreOptions
Inherited Members

Properties

CreateTableIfNotExists

Gets or sets a value indicating whether to create the table if it doesn't exist.

public bool CreateTableIfNotExists { get; set; }

Property Value

bool

Defaults to true.

EnableStreams

Gets or sets a value indicating whether to enable DynamoDB Streams.

public bool EnableStreams { get; set; }

Property Value

bool

Defaults to true.

EventTypeInfoResolver

Gets or sets a source-generated JSON type-info resolver covering the application's domain event types and the runtime types of the values it places in Metadata, enabling a reflection-free serialization path under trimming and native AOT.

public IJsonTypeInfoResolver? EventTypeInfoResolver { get; set; }

Property Value

IJsonTypeInfoResolver

The consumer's event type-info resolver, or null to serialize through reflection.

Remarks

Domain events are consumer types the framework cannot source-generate, so with no resolver the store serializes them through the reflection-based JsonSerializer. That works under the JIT, but a native-AOT application published with reflection-based serialization disabled has no reflection path to fall back on and the first append fails. Set this to a JsonSerializerContext (or any IJsonTypeInfoResolver) covering those types to remove that dependency.

The stored wire format does not vary with this setting. The resolver supplies type metadata only; the property naming policy, string-enum representation and null handling are the store's own and are applied to whichever resolver is in use, so events written with a resolver are byte-identical to events written without one and remain readable by a host configured either way.

Metadata values are typed object and are therefore written as their runtime type. Declare each closed value type the application actually stores -- string, int, bool and so on. Do not declare Dictionary<string, object> as a shortcut: it compiles and then throws on the values it was meant to cover.

EventsTableName

Gets or sets the events table name.

[Required]
public string EventsTableName { get; set; }

Property Value

string

Defaults to "Events".

MaxBatchSize

Gets or sets the maximum batch size for DynamoDB Streams processing.

[Range(1, 2147483647)]
public int MaxBatchSize { get; set; }

Property Value

int

Defaults to 100.

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".

StreamsPollIntervalMs

Gets or sets the poll interval for DynamoDB Streams in milliseconds.

[Range(1, 2147483647)]
public int StreamsPollIntervalMs { get; set; }

Property Value

int

Defaults to 1000ms.

Throughput

Gets or sets throughput configuration for provisioned capacity mode.

public DynamoDbThroughputOptions Throughput { get; set; }

Property Value

DynamoDbThroughputOptions