java - Multiple akka system in a single pc -
how can run multiple akka nodes in single pc? currently, i've following in application.conf
file. each system, added different port numbers, but, can't start more 1 instance. error says, address in use failed bind
.
application.conf
file
remotelookup { include "common" akka { remote.server.port = 2500 cluster.nodename = "n1" } }
update : multiple akka nodes means, have different different stand alone server application, communicate remote master node using akka.
the approach using is:
create different settings in application.conf
each of 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
default config file, in settings module add configs systems:
object configs { private val root = configfactory.load() val 1 = root.getconfig("systemone") val 2 = root.getconfig("systemtwo") }
and create systems configs:
val 1 = actorsystem("systemname", one) val 2 = actorsystem("anothersystemname", two)
don't forget system names must differ
Comments
Post a Comment