O'Reilly logo

Scala Reactive Programming by Rambabu Posa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing WF Reactive Akka Persistence App

Here we will develop some Akka Persistence and Akka Persistence Query applications to test our WF Reactive Akka Persistence application:

  1. 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"))) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required