Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View henrikengstrom's full-sized avatar

Henrik Engstrom (@h3nk3) henrikengstrom

  • grandcloud.com
  • Boulder, CO, USA
  • X @h3nk3
View GitHub Profile
@henrikengstrom
henrikengstrom / application
Created December 22, 2011 19:28
Akka 2.0 application.conf example
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
transport = "akka.remote.netty.NettyRemoteTransport"
netty {
hostname = "127.0.0.1"
port = 2552
}
@henrikengstrom
henrikengstrom / application.conf
Created December 22, 2011 19:35
Akka 2.0 application.conf example
actorSystem1 {
akka {
# the config for actorSystem1
}
}
actorSystem2 {
akka {
# the config for actorSystem2
}
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
deployment {
/actorName {
remote = "akka://actorSystem@127.0.0.1:2553"
}
}
}
remote {
package com.typesafe.akka.demo.remote
import com.typesafe.config.ConfigFactory
import akka.actor.{Actor, Props, ActorSystem}
object MyApp extends App {
// Create an actor system that listens to port 2552
val actorSystem1 = ActorSystem("actorSystem1", ConfigFactory.parseString("""
akka {
actor {
package com.typesafe.akka.demo.remote
import com.typesafe.config.ConfigFactory
import akka.actor.{Actor, Props, ActorSystem}
object MyApp extends App {
// Create an actor system that listens to port 2552
val actorSystem1 = ActorSystem("actorSystem1", ConfigFactory.parseString("""
akka {
actor {
remoteActor = system.actorFor("akka://CalculatorApplication@127.0.0.1:2552/user/simpleCalculator");
remoteActor = system.actorOf(new Props(JAdvancedCalculatorActor.class), "advancedCalculator");
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
transport = "akka.remote.netty.NettyRemoteTransport"
netty {
hostname = "127.0.0.1"
}
calculator {
include "common"
akka {
remote.netty.port = 2552
}
}
remotelookup {
include "common"
calculator {
include "common"
akka {
remote.netty.port = 2552
}
}
remotelookup {
include "common"