Here we will develop some Akka Persistence and Akka Persistence Query applications to test our WF Reactive Akka Persistence application:
- Develop the Akka Persistence application, as shown here:
object WFApp extends App { val system = ActorSystem("WFSystem") val hyd = system.actorOf(WFActor.props("Hyd", Recovery())) val vja = system.actorOf(WFActor.props("Vja", Recovery())) hyd ! AddWF(WeatherForecasting("Hyd","12")) hyd ! AddWF(WeatherForecasting("Hyd", "19")) vja ! AddWF(WeatherForecasting("Vja", "21")) vja ! AddWF(WeatherForecasting("Vja", "18")) system.scheduler.scheduleOnce(5 second, vja, AddWF(WeatherForecasting("Vja","15"))) system.scheduler.scheduleOnce(10 second, vja, RemoveWF(WeatherForecasting("Vja","21"))) ...