I'm using Akka Cluster and I want to listen on the event of MemberJoined and MemberLeft:
override def preStart(): Unit = {
cluster.subscribe(self, classOf[MemberEvent], classOf[MemberJoined], classOf[MemberLeft])
}
The problem is that it requires the following dependency:
"com.typesafe.akka" % "akka-cluster_2.11.xx" % "2.4.12"
But I have to use Scala 2.10 (I can't change it to 2.11) and from the Akka API for Scala 2.10 those 2 events are missing: Akka API for Scala 2.10 (exists on Akka API for Scala 2.11)
Is there any other way I can listen on those events?
override def receive = {
case MemberJoined(member) => println(s"member joined $member")
case MemberLeft(member) => println(s"member left $member")
}