Click or drag to resize
Akka.NETClusterSubscribe Method (IActorRef, ClusterEventSubscriptionInitialStateMode, Type)
Subscribe to one or more cluster domain events.

Namespace:  Akka.Cluster
Assembly:  Akka.Cluster (in Akka.Cluster.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public void Subscribe(
	IActorRef subscriber,
	ClusterEventSubscriptionInitialStateMode initialStateMode,
	params Type[] to
)

Parameters

subscriber
Type: Akka.ActorIActorRef
The actor who'll receive the cluster domain events
initialStateMode
Type: Akka.ClusterClusterEventSubscriptionInitialStateMode
If set to InitialStateAsEvents, then the events corresponding to the current state are sent to subscriber to mimic what it would have seen if it were listening to the events when they occurred in the past. If set to InitialStateAsSnapshot, then a snapshot of ClusterEventCurrentClusterState will be sent to subscriber as the first message.
to
Type: SystemType
An array of event types that the actor receives.
Exceptions
ExceptionCondition
ArgumentException This exception is thrown when the array of supplied types, to, is empty or contains types that do not implement ClusterEventIClusterDomainEvent.
See Also