2.2 Spotlight: Oldest Cluster Member

The cluster knows the order members were added to the cluster. akka.cluster.Member has a method isOlderThan to compare two members by their age. This is useful when you need a stable order of the nodes.

For example, this is how you can keep track of the members, sort them by age, and send each message to the first 3 nodes: 

Recent comments

Blog comments powered by Disqus