evolution-gaming / akka-effect

Cats-Effect & Akka interop
MIT License
55 stars 5 forks source link

Persistent actor based on new persistence API #275

Closed dfakhritdinov closed 11 months ago

dfakhritdinov commented 11 months ago

This PR is third in the sequence of depended PRs:

  1. New persistence api module
  2. Interop w/ Akka Persistence plugins
  3. New persistent actor impl, this one

The PR adds EventSourcedPersistence implementation based on interop from previous PR and EventSourcedActorOf - actor build from the persistence and actor's lifecycle (of typeRecoveryStarted[F, S, E, Receive[F, Envelope[C], ActorOf.Stop]]). The actor can be used as Akka Cluster Sharding actor with persistence not limited by Akka Persistence API while still supporting it as an option.