Table of Contents

Class DynamoDbEventStoreStreamsSubscription

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

DynamoDB Streams subscription for the event store.

public sealed class DynamoDbEventStoreStreamsSubscription : IChangeFeedSubscription<CloudStoredEvent>, IAsyncDisposable
Inheritance
DynamoDbEventStoreStreamsSubscription
Implements
Inherited Members

Constructors

DynamoDbEventStoreStreamsSubscription(IAmazonDynamoDB, IAmazonDynamoDBStreams, DynamoDbEventStoreOptions, ILogger)

Initializes a new instance of the DynamoDbEventStoreStreamsSubscription class.

public DynamoDbEventStoreStreamsSubscription(IAmazonDynamoDB client, IAmazonDynamoDBStreams streamsClient, DynamoDbEventStoreOptions options, ILogger logger)

Parameters

client IAmazonDynamoDB

The DynamoDB client.

streamsClient IAmazonDynamoDBStreams

The DynamoDB Streams client.

options DynamoDbEventStoreOptions

The event store options.

logger ILogger

The logger.

Properties

CurrentContinuationToken

public string? CurrentContinuationToken { get; }

Property Value

string

IsActive

Gets a value indicating whether the subscription is active.

public bool IsActive { get; }

Property Value

bool

SubscriptionId

Gets the subscription identifier.

public string SubscriptionId { get; }

Property Value

string

Methods

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous dispose operation.

ReadChangesAsync(CancellationToken)

Gets the async enumerable of change events.

public IAsyncEnumerable<IChangeFeedEvent<CloudStoredEvent>> ReadChangesAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

IAsyncEnumerable<IChangeFeedEvent<CloudStoredEvent>>

An async enumerable of change feed events.

StartAsync(CancellationToken)

Starts the subscription and begins receiving changes.

public Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A task representing the subscription startup.

StopAsync(CancellationToken)

Stops the subscription gracefully.

public Task StopAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A task representing the graceful shutdown.