Table of Contents

Interface IDynamoDBEventSourcingBuilder

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

Fluent builder for configuring DynamoDB eventsourcing settings.

public interface IDynamoDBEventSourcingBuilder

Methods

BindConfiguration(string)

Binds options from an IConfiguration section.

IDynamoDBEventSourcingBuilder BindConfiguration(string sectionPath)

Parameters

sectionPath string

Returns

IDynamoDBEventSourcingBuilder

Client(IAmazonDynamoDB)

Sets a pre-configured Amazon.DynamoDBv2.IAmazonDynamoDB client.

IDynamoDBEventSourcingBuilder Client(IAmazonDynamoDB client)

Parameters

client IAmazonDynamoDB

Returns

IDynamoDBEventSourcingBuilder

ClientFactory(Func<IServiceProvider, IAmazonDynamoDB>)

Sets a factory that resolves an Amazon.DynamoDBv2.IAmazonDynamoDB from DI.

IDynamoDBEventSourcingBuilder ClientFactory(Func<IServiceProvider, IAmazonDynamoDB> clientFactory)

Parameters

clientFactory Func<IServiceProvider, IAmazonDynamoDB>

Returns

IDynamoDBEventSourcingBuilder

Region(RegionEndpoint)

Sets the AWS region explicitly.

IDynamoDBEventSourcingBuilder Region(RegionEndpoint region)

Parameters

region RegionEndpoint

Returns

IDynamoDBEventSourcingBuilder

ServiceUrl(string)

Sets the DynamoDB service URL (for LocalStack/DynamoDB Local).

IDynamoDBEventSourcingBuilder ServiceUrl(string serviceUrl)

Parameters

serviceUrl string

Returns

IDynamoDBEventSourcingBuilder

StreamsClient(IAmazonDynamoDBStreams)

Sets a pre-configured Amazon.DynamoDBStreams.IAmazonDynamoDBStreams client, enabling the change feed.

IDynamoDBEventSourcingBuilder StreamsClient(IAmazonDynamoDBStreams streamsClient)

Parameters

streamsClient IAmazonDynamoDBStreams

The Streams client to use for change-feed reads.

Returns

IDynamoDBEventSourcingBuilder

The builder for fluent chaining.

Remarks

Only needed alongside Client(IAmazonDynamoDB) or ClientFactory(Func<IServiceProvider, IAmazonDynamoDB>): when the connection is configured by service URL or region, a matching Streams client is built automatically. The event store appends, loads, and reads versions without one; it is required only to consume a change feed.

Unlike the connection methods, this is orthogonal to the connection mode: selecting or changing a connection method neither sets nor clears the Streams client. It is last-wins against StreamsClientFactory(Func<IServiceProvider, IAmazonDynamoDBStreams>).

StreamsClientFactory(Func<IServiceProvider, IAmazonDynamoDBStreams>)

Sets a factory that resolves an Amazon.DynamoDBStreams.IAmazonDynamoDBStreams from DI, enabling the change feed.

IDynamoDBEventSourcingBuilder StreamsClientFactory(Func<IServiceProvider, IAmazonDynamoDBStreams> streamsClientFactory)

Parameters

streamsClientFactory Func<IServiceProvider, IAmazonDynamoDBStreams>

The factory that resolves the Streams client from the container.

Returns

IDynamoDBEventSourcingBuilder

The builder for fluent chaining.

Remarks

The deferred form of StreamsClient(IAmazonDynamoDBStreams), for a client whose configuration is not known until the container is built. The same rule applies: it is needed only alongside Client(IAmazonDynamoDB) or ClientFactory(Func<IServiceProvider, IAmazonDynamoDB>), because a connection configured by service URL or region builds a matching Streams client automatically, and the event store is fully functional for appends, loads, and version queries without one.

Unlike the connection methods, this is orthogonal to the connection mode: selecting or changing a connection method neither sets nor clears the Streams client. It is last-wins against StreamsClient(IAmazonDynamoDBStreams).

TableName(string)

Sets the table name.

IDynamoDBEventSourcingBuilder TableName(string tableName)

Parameters

tableName string

Returns

IDynamoDBEventSourcingBuilder

TablePrefix(string)

Sets a prefix for table names (environment isolation).

IDynamoDBEventSourcingBuilder TablePrefix(string prefix)

Parameters

prefix string

Returns

IDynamoDBEventSourcingBuilder