calcActor ! Clear calcActor ! Num(13.0) calcActor ! Mul(1.5) implicit val timeout = akka.util.Timeout(1 second) ((calcActor ? GetResult).mapTo[String]) foreach println scala.io.StdIn.readLine() calcActor ! Div(0.0) calcActor ! Div(1.5) calcActor ! Add(100.0) ((calcActor ? GetResult).mapTo[String]) foreach println scala.io.StdIn.readLine() remoteSystem.terminate() is: 19.5Result of calculation is: 113.0[WARN] [06/20/2017 19:28:10.720] [remoteSystem-akka.actor.default-dispatcher-4] [akka://remoteSystem/user/parentActor/calculator] / by zero
http://www.cnblogs.com/tiger-xc/p/7057788.html
akka { actor { provider = remote } remote { enabled-transports = ["akka.remote.netty.tcp"] netty.tcp { hostname = "127.0.0.1" port = 2552 } log-sent-messages = on log-received-messages = on } }
延伸閱讀
學(xué)習(xí)是年輕人改變自己的最好方式