KurrentDB (formerly EventStoreDB) is the primary event store supported by Eventuous. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Eventuous/eventuous/llms.txt
Use this file to discover all available pages before exploring further.
Eventuous.KurrentDB package provides a full IEventStore implementation backed by KurrentDB’s gRPC client, along with four subscription types — two catch-up and two persistent — and a producer for writing events back to streams.
Installation
Event Store
KurrentDBEventStore implements IEventStore and is the recommended way to persist and load aggregate events in Eventuous. It accepts either a ready-made KurrentDBClient instance or KurrentDBClientSettings and will create the client itself.
EsdbEventStore is an obsolete alias that still compiles but will emit a warning. Migrate to KurrentDBEventStore.Dependency injection
Register the KurrentDB client and the event store together:appsettings.json would contain:
Quick start with Docker
Spin up a local KurrentDB instance for development in seconds:2113. Navigate to http://localhost:2113 to open the KurrentDB Admin UI.
Subscriptions
Eventuous ships four subscription classes for KurrentDB. All are registered through the standardAddSubscription<TSubscription, TOptions> extension.
Catch-up subscriptions
Catch-up subscriptions read all events from a stored checkpoint and continue in real time. They require anICheckpointStore to persist their position.
AllStreamSubscription
Subscribes to the global $all stream and delivers every event written to the server.
- Options type:
AllStreamSubscriptionOptions - Key options:
EventFilter(server-side filter),CheckpointInterval(default10),StartFrom(InitialPosition.Earliest/Latest),ResolveLinkTos
StreamSubscription
Subscribes to a single, named stream.
- Options type:
StreamSubscriptionOptions - Key options:
StreamName(required),IgnoreSystemEvents(defaulttrue),StartFrom,ResolveLinkTos
Persistent subscriptions
KurrentDB persistent subscriptions store their own checkpoints server-side. The consumer group is created automatically if it doesn’t exist yet.AllPersistentSubscription
Server-managed persistent subscription against the $all stream.
- Options type:
AllPersistentSubscriptionOptions - Key options:
EventFilter,BufferSize,Credentials,Deadline
StreamPersistentSubscription
Server-managed persistent subscription against a named stream.
- Options type:
StreamPersistentSubscriptionOptions - Key options:
StreamName(required),BufferSize,Credentials
Producer
KurrentDBProducer appends events to any stream and integrates with the Eventuous Gateway pattern.
KurrentDBProduceOptions controls per-produce behaviour:
| Property | Default | Description |
|---|---|---|
ExpectedState | StreamState.Any | Optimistic concurrency check |
MaxAppendEventsCount | 500 | Maximum events per append batch |
Deadline | null | gRPC deadline for the operation |
Credentials | null | Per-call user credentials override |
Complete registration example
The following shows the fullRegistrations.cs pattern taken from the Eventuous sample application: