How to replay events in akka persistence

akka
java
(Anilkumble) #1

Hi,

I have to create a serverCluser with two nodes,
a clientActor and a persistent Actor.

If I am passing “start” as a message from client to server then my server will print an integer from 1 to 100. This action willl be peformed in either of the two nodes in serverCluster and it will persist the data in persistent Actor.

If I stop the running node in the middle of the operation (say after printing 50 integers) then my another node should take care of the remaining part of the work(which means printing integer from 50 to 100) by replaying the events that stored in the persistent actor.

How will I achieve this ?