Troolio.Stores.EventStore 10.0.2

dotnet add package Troolio.Stores.EventStore --version 10.0.2
                    
NuGet\Install-Package Troolio.Stores.EventStore -Version 10.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Troolio.Stores.EventStore" Version="10.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Troolio.Stores.EventStore" Version="10.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Troolio.Stores.EventStore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Troolio.Stores.EventStore --version 10.0.2
                    
#r "nuget: Troolio.Stores.EventStore, 10.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Troolio.Stores.EventStore@10.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Troolio.Stores.EventStore&version=10.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Troolio.Stores.EventStore&version=10.0.2
                    
Install as a Cake Tool

Troolio.Stores.EventStore

Supported gRPC persistence for ordinary Troolio actors using KurrentDB. The historical package ID remains available; the deprecated TCP transport has been replaced. Requires .NET 10 and Troolio.Core 10.0.8.

dotnet add package Troolio.Stores.EventStore --version 10.0.2

Register the client and ordinary store

The host owns a reusable client. Credentials and TLS belong in application configuration, not source code.

services.AddSingleton(_ => new KurrentDBClient(
    KurrentDBClientSettings.Create(configuration.GetConnectionString("EventStore")!)));
services.AddSingleton<ESStore>();

Use TroolioServer<ESStore> when building the Troolio host. Its serialization and logging services supply the remaining constructor arguments:

IHost host = Host.CreateDefaultBuilder().TroolioServer<ESStore>(
    "Tasks", new[] { typeof(TaskActor).Assembly }, services =>
    {
        services.AddSingleton(_ => new KurrentDBClient(
            KurrentDBClientSettings.Create(connectionString)));
    });
await host.StartAsync();

Configure the host's Orleans membership/storage profile separately. The convenience Startup.RunWithDefaults wrapper reads ConnectionStrings:EventStore from appsettings and environment variables. ES.CreateClient(connectionString) creates a client; it does not use a global static connection.

A local disposable insecure node can use esdb://localhost:2113?tls=false. Production should use TLS and credentials, for example esdb://user:password@server:2113?tls=true, supplied securely through configuration.

Append with concurrency control

A stream head of 0 means no events. Troolio event versions start at 1; KurrentDB revisions start at 0. The adapter performs that translation and throws Troolio's WrongExpectedVersionException on a conflicting append.

IEvent[] events = { new TaskRenamed(taskId, "New title", headers) };
ulong appended = await store.Append(streamName, expectedVersion, events);
IEvent[] tail = await store.ReadStreamFromEvent(streamName, expectedVersion + 1);
(IEvent? last, ulong head) = await store.ReadLastEvent(streamName);

Events retain serialized metadata including correlation, causation, user, device and transaction IDs. An event's message ID supplies its storage identity when present. Empty appends write nothing. Unknown event types or invalid payloads fail explicitly; they are not silently dropped from actor replay.

Linked read models refer to source stream/version pairs. The adapter writes the KurrentDB link representation and resolves it on reads.

await store.Append(readModelStream, linkHead,
    new IEvent[] { new LinkEvent(Guid.NewGuid(), sourceVersion, sourceStream) });
IEvent? sourceEvent = await store.ReadStreamEvent(readModelStream, linkHead + 1);

The link stream retains its own version even when the resolved source event has a different source version. Keep source events available for the lifetime of linked read models. Typed actor snapshot events use the same serializer and ordinary persistence API.

Migration and delivery limits

Replace old TCP host/port settings and global ES.Connection registration with the injected gRPC client. KurrentDB versions without TCP support can now be used. This package preserves ordinary event CLR type names and serialized payloads; retain event types/aliases and validate historical data before renaming application types.

This adapter implements ordinary IStore. Troolio.KurrentDB provides separate policy/authority-driven selected transaction capabilities; it is not a drop-in ordinary store replacement. Domain append here does not automatically provide durable projection dispatch, a SQL inbox or atomic cross-actor operations.

Actor activation may restore its own state from its stream. Startup and readiness do not enumerate all actors or replay global history. Recovery tools should operate on bounded streams/partitions. Clear rejects deletion of shared event history; reset explicitly owned test infrastructure instead.

EventStore store guide · ToDo sample

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.2 96 10/7/2026
10.0.1 148 4/22/2026
10.0.0 275 3/12/2026
1.0.0 495 9/22/2022