* Removed need for extra actor that subscribes to cluster
events
* ClusterRouterActor is the router actor and aslo subscribes
* Less scary initialization, and safe calls to createRoutees
* Intercept ClusterDomainEvent to route them to ClusterRouterActor
instead of to the routees
* Ordinary withRouther withDeploy is TOO ugly for this
* Implicit conversion adds withClusterRouter to Props
for Scala API
* Helper method in ClusterRouterPropsDecorator for Java API
* Config max-nr-of-instances-per-node
* selectDeploymentTarget that takes max-nr-of-instances-per-node
and nr-of-instances into account
* Deploy when new member added or removed
* Moved routeeProps to RouteeProvider constructor, needed for
this feature, but also simplifies createRoute, createRoutee,
and resize, since routeeProps doesn't have to be passed around.
* createRoutees only for new nrOfInstances
* createRoutees also registers
* New registerRouteesFor for path lookup
* removeRoutees to gracefully unregister and stop routee
* We will write more tests that rely on real Cluster(system) extension,
such as ClusterRoundRobinRoutedActorSpec
* When not using FailureDetectorStrategy or overriding seed nodes
MultiNodeClusterSpec will use the real Cluster(system) extension
instead of a new Cluster instance with additional test facilities
the previous patch of including the UID in the Terminated message did
suffer from the system vs. normal message ordering problem, hence I
reverted the previous fix and replaced it by sending a NullMessage after
ChildTerminated, exactly like in the Supervise case.
* Defined the domain events in ClusterEvent.scala file
* Produce events from diff and publish publish to event bus
from separate actor, ClusterDomainEventPublisher
* Adjustments of tests
- parent just checked for system messages and finds none
- Supervise is enqueued to parent
- Failed is enqueued to the parent
- Failed is processed before Supervise and thus dropped due to
non-matching UID
remedy is to enqueue NullMessage after enqueuing Supervise but before
really starting the actor, so that if NullMessage overtakes Supervise
the loop in processMailbox will then pick up Supervise next