Reputation: 395
I have 2 project (sbt), say projectA and projectB
. projectA dependsOn projectB. How do i configure akka cluster such that both the projects passes messages using actors?
Both projectA and projectB forms a cluster with seed -nodes.
Upvotes: 1
Views: 991
Reputation: 684
If you want to send a message to a specific actor you can look up remote actors via actorSelection:
val selection context.actorSelection("akka.tcp://actorSystemName@10.0.0.1:2552/user/actorName")
Lots of details in the docs here: https://doc.akka.io/docs/akka/2.5/remoting.html
Of you can make use of a feature like ClusterSharding or ClusterSingleton where you don't need to create the actors, just send messages and Akka will create them for you.
Upvotes: 1