Before diving into the development of Akka Persistence application, we will consider some steps on how to develop an Akka Persistence Actor, covering which components are important, which functions are required to provide implementation, how to interact with Journals, and so on.
How to develop Akka Persistence Actors
Step1 – Use the PersistenceActor trait
If want to develop an Akka Persistence component or Actor, add the PersistenceActor trait to this Actor, as shown here:
class HelloWorldActor extends PersistentActor{
// Actor State goes here
// Actor Operations goes here
}
Here, PersistentActor is a trait defined in the akka.persistence package. It marks our HelloWorldActor as a Persistence Actor.
...