- Create a new file named application-3.conf in the src/main/resources directory with the following contents:
akka { actor { provider = "akka.remote.RemoteActorRefProvider" } remote { enabled-transports = ["akka.remote.netty.tcp"] netty.tcp { hostname = "127.0.0.1" port = 2554 } } }
- Create a Scala Akka actor that will do the work and print the information once done. Let's name it WorkerActor. Use Thread.sleep to simulate the time spent doing the processing (this is only for testing purposes and should not be done in a production environment). In this file, define case classes as messages:
package com.packt.chapter7 import akka.actor.{Actor, ActorRef} case class Work(workId: String) case class WorkDone(workId: String) ...