Closed synox closed 7 years ago
I solved it like this:
get akka Config and the default akka system:
@Autowired private Config config;
@Autowired private ActorSystem node1;
Create second akka system:
node2 = ActorSystem.create("test", config.withValue("akka.remote.netty.tcp.port", ConfigValueFactory.fromAnyRef(2552)));
After they can be joined as a cluster:
Cluster cluster1 = Cluster.get(node1);
cluster1.join(cluster1.selfAddress());
Cluster cluster2 = Cluster.get(node2);
cluster2.join(cluster1.selfAddress());
Is this the correct way? Suggestions?
Hi Lance
Thanks for providing this library. One thing is not clear to me:
How can I start multiple AkkaSystems in a Java-JUnit-Test? Instead of @Autowired ActorSystem i would like to start and stop them within the test case.
Thanks