I am trying to deploy actor remotely on different JVM. 

**ProcessingMain** (start on JVM1)  

    object ProcessingMain {
    
      def main(args: Array[String]) = {
        startProcessingSystem()
      }
    
      def startProcessingSystem() = {
        ActorSystem.create("ProcessingSystem", 
ConfigFactory.load("processingSystem"))
        println("ProcessingSystem Started")
      }
    }

**ConnectorMain**(start on JVM2)  

    object ConnectorMain {
    
      def main(args: Array[String]) = {
        startConnectorSystem()
      }
    
      def startConnectorSystem() = {
        val system = ActorSystem.create("ConnectorSystem", 
ConfigFactory.load("connectorSystem"))
        val actor = system.actorOf(Props[ConnectorActor], "connectorActor")
        println("ConnectorSystem Started")
        actor ! StartRemoteProcessor
      }
    }

**common.conf**

    akka {
      actor {
        provider = "akka.remote.RemoteActorRefProvider"
      }
    
      remote {
        netty.tcp {
          hostname = "127.0.0.1"
        }
      }
    }

**processingSystem.conf**

    include "common"
    
    akka {
      # LISTEN on tcp port 2552
      remote.netty.tcp.port = 2552
    }

**connectorSystem.conf**

    include "common"
    
    akka {
      actor {
        deployment {
          /connectorActor/processingActor {
            remote = "akka.tcp://[email protected]:2552"
          }
        }
      }
      remote.netty.tcp.port = 2554
    }

**ConnnectorActor**

    import akka.actor._
    import com.learn.remote.processing.ProcessingActor
    
    case object StartRemoteProcessor
    
    class ConnectorActor extends Actor with ActorLogging {
      val remoteProcessor = context.actorOf(Props[ProcessingActor], 
"processingActor")
    
      def receive = {
        case StartRemoteProcessor =>
          println("Starting Remote Processor")
          remoteProcessor ! "Start"
      }
    }

When I run **ProcessingMain**, I see 

    ProcessingSystem Started

When I run **ConnectorMain**, I see  

    ConnectorSystem Started
    Starting Remote Processor
    ProcessingActor 
path:akka://ConnectorSystem/user/connectorActor/processingActor

As you see, instead of starting `processingActor` on `ProcessingSystem` it 
is started on `ConnectorSystem`

What's wrong going on?


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to