Is there a way to disable replay journal when recovery?

Hello, I’m newbie for Akka.
I’m planning to use cluster sharding and persist actor with dynamodb.

I would like to use snapshot table only.
Because I never use event’s history.

Is it possible to recover persist actor’s previous state with using snapshot only?

Welcome to the forums and to using Akka.

If your use case is not to do event sourcing, but just persisting the complete state of the actor at different times I’d recommend you do this in your own actor rather than use akka-persistence which is entirely about representing the actor state with events. Snapshots in akka-persistence is basically just an optimization.

Thanks for reply.
I’m trying to make my own actor (not persist).
Is it correct that actors are unique when I use cluster sharding? (I have only one shard)

Yes, sharding helps making sure only a single actor per entityId is alive. If you have only one and not id-keyed actors you can also use cluster-singleton for this.

Note that it is important to deal with cluster topology changes correctly (nodes leaving the cluster gracefully and nodes crashing, see docs https://doc.akka.io/docs/akka/current/cluster-usage.html#downing ).

1 Like