Click or drag to resize
Akka.NETAkka.Routing Namespace
The Akka.Routing namespace contains classes that provide for routing messages within the system.
Classes
  ClassDescription
Public classActorRefRoutee
TBD
Public classActorSelectionRoutee
TBD
Public classAddRoutee
This class represents a RouterManagementMessage sent to a Router instructing it to add a specific routee to the router's collection of routees. It may be handled after other messages.
Public classAdjustPoolSize
This class represents a RouterManagementMessage sent to a Pool router instructing it to increase or decrease the number of allotted routees the router can use. It may be handled after other messages.
Remarks
Positive Change will add that number of routees to the Pool. Negative Change will remove that number of routees from the Pool.
Routees are stopped by sending a PoisonPill to the routee. Precautions are taken to reduce the risk of dropping messages that are concurrently being routed to the remove routee, but there are no guarantees.
Public classBroadcast
TBD
Public classBroadcastGroup
This class represents a Group router that sends messages it receives to all of its routees.
Public classBroadcastGroupBroadcastGroupSurrogate
This class represents a surrogate of a BroadcastGroup router. Its main use is to help during the serialization process.
Public classBroadcastPool
This class represents a Pool router that sends messages it receives to all of its routees.
Public classBroadcastPoolBroadcastPoolSurrogate
This class represents a surrogate of a BroadcastPool router. Its main use is to help during the serialization process.
Public classBroadcastRoutingLogic
This class contains logic used by a Router to route a message to multiple routees.
Public classConsistentHash
Public classConsistentHashConsistentHashingPoolSurrogate
This class represents a surrogate of a ConsistentHashingPool router. Its main use is to help during the serialization process.
Public classConsistentHashT
Consistent Hashing node ring implementation. A good explanation of Consistent Hashing: http://weblogs.java.net/blog/tomwhite/archive/2007/11/consistent_hash.html Note that toString of the ring nodes are used for the node hash, i.e. make sure it is different for different nodes.
Public classConsistentHashTConsistentHashingGroupSurrogate
This class represents a surrogate of a ConsistentHashingGroup router. Its main use is to help during the serialization process.
Public classConsistentHashableEnvelope
This class represents a RouterEnvelope that can be wrapped around a message in order to make it hashable for use with ConsistentHashingGroup or ConsistentHashingPool routers.
Public classConsistentHashingGroup
This class represents a Group router that sends messages to a Routee determined using consistent-hashing. Please refer to ConsistentHashingRoutingLogic for more information on consistent hashing.
Public classConsistentHashingGroupConsistentHashingGroupSurrogate
This class represents a surrogate of a ConsistentHashingGroup router. Its main use is to help during the serialization process.
Public classConsistentHashingPool
This class represents a Pool router that sends messages to a Routee determined using consistent-hashing. Please refer to ConsistentHashingRoutingLogic for more information on consistent hashing.
Note Note
Using Resizer with ConsistentHashingPool is potentially harmful, as hash ranges might change radically during live message processing. This router works best with fixed-sized pools or fixed number of routees per node in the event of clustered deployments.
Public classConsistentHashingPoolConsistentHashingPoolSurrogate
This class represents a surrogate of a ConsistentHashingPool router. Its main use is to help during the serialization process.
Public classConsistentHashingRoutingLogic
This class contains logic used by a Router to route a message to a Routee determined using consistent-hashing. This process has the router select a routee based on a message's consistent hash key. There are 3 ways to define the key, which can be used individually or combined to form the key. The ConsistentHashMapping is tried first.
  1. You can define a ConsistentHashMapping or use WithHashMapping(ConsistentHashMapping) of the router to map incoming messages to their consistent hash key. This makes the decision transparent for the sender.
  2. Messages may implement IConsistentHashable. The hash key is part of the message and it's convenient to define it together with the message definition.
  3. The message can be wrapped in a ConsistentHashableEnvelope to define what data to use for the consistent hash key. The sender knows what key to use.
Public classCustomRouterConfig
If a custom router implementation is not a Group nor a Pool it may extend this base class.
Public classDeafen
The class represents a ListenerMessage sent by an IActorRef to another IActorRef instructing the second actor to stop listening for messages sent by the first actor.
Public classDefaultResizer
Implementation of Resizer that adjust the Pool based on specified thresholds.
Public classFromConfig
Router configuration which has no default, i.e. external configuration is required. This can be used when the dispatcher to be used for the head Router needs to be configured
Public classFromConfigFromConfigSurrogate
This class represents a surrogate of a FromConfig router. Its main use is to help during the serialization process.
Public classGetRoutees
This class represents a RouterManagementMessage sent to a Router instructing it to send a Routees message back to the requestor that lists the routees that the router is currently using.
Public classGroup
This class provides base functionality for all group routers in the system. Group routers are routers that use already created routees. These routees are supplied to the router and are addressed through ActorSelection paths.
Public classListen
The class represents a ListenerMessage sent by an IActorRef to another IActorRef instructing the second actor to start listening for messages sent by the first actor.
Public classListenerMessage
This class represents a message sent by an actor to another actor that is listening to it.
Public classListenerSupport
This class adds IListeners capabilities to an actor.
Note Note
ListenerReceive must be wired manually into the actor's OnReceive(Object) method.
Public classNoRouter
Routing configuration that indicates no routing; this is also the default value which hence overrides the merge strategy in order to accept values from lower-precedence sources. The decision whether or not to create a router is taken in the LocalActorRefProvider based on Props(Props).
Public classNoRouterNoRouterSurrogate
This class represents a surrogate of a NoRouter router. Its main use is to help during the serialization process.
Public classPool
This class provides base functionality for all pool routers in the system. Pool routers are routers that create their own routees based on the provided configuration.
Public classRandomGroup
This class represents a Group router that sends messages to a random Routee.
Public classRandomGroupRandomGroupSurrogate
This class represents a surrogate of a RandomGroup router. Its main use is to help during the serialization process.
Public classRandomLogic
This class contains logic used by a Router to route a message to a random Routee.
Public classRandomPool
This class represents a Pool router that sends messages to a random Routee.
Public classRandomPoolRandomPoolSurrogate
This class represents a surrogate of a RandomPool router. Its main use is to help during the serialization process.
Public classRemoveRoutee
This class represents a RouterManagementMessage sent to a Router instructing it to remove a specific routee from the router's collection of routees. It may be handled after other messages.
Note Note
For a pool with child routees the routee is stopped by sending a PoisonPill to the routee. Precautions are taken to reduce the risk of dropping messages that are concurrently being routed to the remove routee, but there are no guarantees.
Public classResize
Command used to resize a ResizablePoolActor
Public classResizer
Pool routers with dynamically resizable number of routees are implemented by providing a Resizer implementation in the Pool configuration
Public classRoundRobinGroup
This class represents a Group router that sends messages to a Routee determined using round-robin. This process has the router select from a list of routees in sequential order. When the list has been exhausted, the router iterates again from the beginning of the list.
Note Note
For concurrent calls, round robin is just a best effort.
Note Note
The configuration parameter trumps the constructor arguments. This means that if you provide `paths` during instantiation they will be ignored if the router is defined in the configuration file for the actor being used.
Public classRoundRobinGroupRoundRobinGroupSurrogate
This class represents a surrogate of a RoundRobinGroup router. Its main use is to help during the serialization process.
Public classRoundRobinPool
This class represents a Pool router that sends messages to a Routee determined using round-robin. This process has the router select from a list of routees in sequential order. When the list has been exhausted, the router iterates again from the beginning of the list.
Note Note
For concurrent calls, round robin is just a best effort.
Public classRoundRobinPoolRoundRobinPoolSurrogate
This class represents a surrogate of a RoundRobinPool router. Its main use is to help during the serialization process.
Public classRoundRobinRoutingLogic
This class contains logic used by a Router to route a message to a Routee determined using round-robin. This process has the router select from a list of routees in sequential order. When the list has been exhausted, the router iterates again from the beginning of the list.
Note Note
For concurrent calls, round robin is just a best effort.
Public classRoutee
TBD
Public classRoutees
This class represents a message used to carry information about what routees a Router is currently using.
Public classRouter
TBD
Public classRouterConfig
This class provides base functionality used in the creation and configuration of the various routers in the system.
Public classRouterEnvelope
TBD
Public classRouterManagementMessage
This class represents a non-routed message that is processed by the Router. These types of messages are for managing the router itself, like adding routees, deleting routees, etc.
Public classRouterMessage
This class contains convenience methods used to send messages to a Router.
Public classRoutingLogic
This class contains logic used by a Router to route messages to one or more actors. These actors are known in the system as a Routee.
Public classScatterGatherFirstCompletedGroup
This class represents a Group router that sends messages to a Routee determined using scatter-gather-first-completed. This process has the router send a message to all of its routees. The first response is used and the remaining are discarded. If the none of the routees respond within a specified time limit, a timeout failure occurs.
Public classScatterGatherFirstCompletedGroupScatterGatherFirstCompletedGroupSurrogate
This class represents a surrogate of a ScatterGatherFirstCompletedGroup router. Its main use is to help during the serialization process.
Public classScatterGatherFirstCompletedPool
This class represents a Pool router that sends messages to a Routee determined using scatter-gather-first-completed. This process has the router send a message to all of its routees. The first response is used and the remaining are discarded. If the none of the routees respond within a specified time limit, a timeout failure occurs.
Public classScatterGatherFirstCompletedPoolScatterGatherFirstCompletedPoolSurrogate
This class represents a surrogate of a ScatterGatherFirstCompletedPool router. Its main use is to help during the serialization process.
Public classScatterGatherFirstCompletedRoutingLogic
This class contains logic used by a Router to route a message to a Routee determined using scatter-gather-first-completed. This process has the router send a message to all of its routees. The first response is used and the remaining are discarded. If the none of the routees respond within a specified time limit, a timeout failure occurs.
Public classSeveralRoutees
TBD
Public classSmallestMailboxPool
This class represents a Pool router that sends messages to a Routee determined using smallest-mailbox. Please refer to SmallestMailboxRoutingLogic for more information on the selection process.
Public classSmallestMailboxPoolSmallestMailboxPoolSurrogate
This class represents a surrogate of a SmallestMailboxPool router. Its main use is to help during the serialization process.
Public classSmallestMailboxRoutingLogic
This class contains logic used by a Router to route a message to a Routee determined using smallest-mailbox. This process has the router select a routee based on the fewest number of messages in its routees' mailbox. The selection is done in the following order:
  • Pick any routee with an empty mailbox.
  • Pick a routee with the fewest pending messages in its mailbox.
  • Pick any remaining routees.
Note Note
Remote routees are consider lowest priority, since their mailbox size is unknown.
Note Note
For the case, when all routees are of unpredictable size, the selection process fails back to round-robin.
Public classTailChopping
This class contains logic used by a Router to route a message to a Routee determined using tail-chopping. This process has the router select a random routee, then waits an interval before sending to a different randomly chosen routee. The first response is used and the remaining are discarded. If the none of the routees respond within a specified time limit, a timeout failure occurs.
Public classTailChoppingGroup
This class represents a Group router that sends messages to a Routee determined using tail-chopping. This process has the router select a random routee, then waits an interval before sending to a different randomly chosen routee. The first response is used and the remaining are discarded. If the none of the routees respond within a specified time limit, a timeout failure occurs.
Public classTailChoppingGroupTailChoppingGroupSurrogate
This class represents a surrogate of a TailChoppingGroup router. Its main use is to help during the serialization process.
Public classTailChoppingPool
This class represents a Pool router that sends messages to a Routee determined using tail-chopping. This process has the router select a random routee, then waits an interval before sending to a different randomly chosen routee. The first response is used and the remaining are discarded. If the none of the routees respond within a specified time limit, a timeout failure occurs.
Public classTailChoppingPoolTailChoppingPoolSurrogate
This class represents a surrogate of a TailChoppingPool router. Its main use is to help during the serialization process.
Public classWithListeners
Interfaces
  InterfaceDescription
Public interfaceIConsistentHashable
This interface marks a given class as consistently hashable, for use with ConsistentHashingGroup or ConsistentHashingPool routers.
Public interfaceIListeners
This interface is needed to implement listening capabilities on an actor.
Remarks
  • Use the Gossip(Object) method to send a message to the listeners.
  • Send
    Listen(Self)
    to another Actor to start listening.
  • Send
    Deafen(Self)
    to another Actor to stop listening.
  • Send
    WithListeners(delegate)
    to traverse the current listeners.
Delegates
  DelegateDescription
Public delegateConsistentHashMapping
Delegate for computing the hashkey from any given type of message. Extracts the property / data that is going to be used for a given hash, but doesn't actually return the hash values themselves. If returning a byte[] or string it will be used as is, otherwise the configured Serializer will be applied to the returned data.