0

I am using akka remote deployment. I used logging to ensure if the actor has successfully deployed remotely. Here is my log info

[adaptiveCEP-akka.actor.default-dispatcher-18] [akka.tcp://adaptiveCEP@127.0.0.1:2555/remote/akka.tcp/adaptiveCEP@127.0.0.1:2554/user/disjunction/simple-2555-0.4631423946172286] hi, I am simple-2555-0.4631423946172286
[adaptiveCEP-akka.actor.default-dispatcher-18] [akka.tcp://adaptiveCEP@127.0.0.1:2555/remote/akka.tcp/adaptiveCEP@127.0.0.1:2554/user/disjunction/simple-2555-0.4631423946172286] hi, I am Actor[akka://adaptiveCEP/remote/akka.tcp/adaptiveCEP@127.0.0.1:2554/user/disjunction/simple-2555-0.4631423946172286#1386676347]

It appears as if actor simple-2555-0.4631423946172286#1386676347 is child actor of disjunction actor and both hosted on the same machine (no remote deployment of child). And the actor who is doing supervision is actor akka.tcp://adaptiveCEP@127.0.0.1:2555.

According to Top-Level Scopes for Actor Paths:

"/remote" is an artificial path below which all actors reside whose supervisors are remote actor references

Have I misunderstood something?

If required

val randomRouter = actorSystem.actorOf(Props[Master],
      "disjunction")

Master.scala

val temp = context.actorOf(Props[SimpleClusterListener].withDeploy(Deploy(scope = RemoteScope(address))), "simple-" + port + "-" + Math.random())
temp ! "hi"

Reference

Create an Akka actor remotely without a new ActorSystem

anasanjaria
  • 1,308
  • 1
  • 15
  • 19

1 Answers1

0

No, your actor is not deployed locally, it's on the remote machine

akka.tcp://adaptiveCEP@127.0.0.1:2555/remote/akka.tcp/adaptiveCEP@127.0.0.1:2554/user/disjunction/simple-2555-0.4631423946172286] hi, I am simple-2555-0.4631423946172286

This log item shows that your actor is running on actor system "adaptiveCEP" on "127.0.0.1:2555" machine and is being supervised by "disjunction" actor in "adaptiveCEP@127.0.0.1:2554"

Raheel
  • 4,953
  • 4
  • 34
  • 40