Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

EventStore persistence for Proto.Actor

Tha library implements persisting events and snapshots for the Proto.Actor actor model framework.


Install the package to your solution:

dotnet add nuget Proto.Persistence.EventStore

Create an EventStore connection in your startup code and ask it to connect.

var esConnection = EventStoreConnection.Create(
    "ConnectTo=tcp://admin:changeit@localhost:1113; DefaultUserCredentials=admin:changeit;",

await esConnection.ConnectAsync();

Then, configure the persistence for your actor:

var provider = new EventStoreProvider(esConnection);
var props = Props.FromProducer(() => new MyPersistenceActor(provider));

From here, everything should work, including snapshots.

Don't forget to close the connection when your app stops:



Check Proto.Persistence.EventStore.Sample to see stuff working.

Use docker-compose up to start the EventStore in a container. The docker-compose.yml file is located in the sample project directory. Check the web UI at http://localhost:2113 with user user and password changeit, look at the Stream Browser to see the actor stream and the snapshot stream.

When the app runs, it only adds events and snapshots. If you stop the app and run it again, it will recover actors by reading snapshots and events and then continue adding new events.

You can’t perform that action at this time.