Our approach:
Create various settings in application.conf for each of the systems:
systemOne { akka { remote { enabled-transports = ["akka.remote.netty.tcp"] netty.tcp { hostname = ${public-hostname} port = 2552 } } } } systemTwo { akka { remote { enabled-transports = ["akka.remote.netty.tcp"] netty.tcp { hostname = ${public-hostname} port = 2553 } } } }
application.conf is the default configuration file, so in your settings module add the configs for the systems:
object Configs { private val root = ConfigFactory.load() val one = root.getConfig("systemOne") val two = root.getConfig("systemTwo") }
and then create systems with these configurations:
val one = ActorSystem("SystemName", one) val two = ActorSystem("AnotherSystemName", two)
Remember that system names must be different
source share