Search Results for

    Show / Hide Table of Contents

    Namespace Akka.Routing

    Classes

    ActorRefRoutee

    A Routee that resolves to an IActorRef

    ActorSelectionRoutee

    A Routee that resolves to an ActorSelection

    AddRoutee

    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.

    AdjustPoolSize

    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.

    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.

    Broadcast

    A special RouterEnvelope that will broadcast a message from this router to all Routees regardless of the RoutingLogic.

    BroadcastGroup

    This class represents a Group router that sends messages it receives to all of its routees.

    BroadcastGroup.BroadcastGroupSurrogate

    This class represents a surrogate of a BroadcastGroup router. Its main use is to help during the serialization process.

    BroadcastPool

    This class represents a Pool router that sends messages it receives to all of its routees.

    BroadcastPool.BroadcastPoolSurrogate

    This class represents a surrogate of a BroadcastPool router. Its main use is to help during the serialization process.

    BroadcastRoutingLogic

    This class contains logic used by a Router to route a message to multiple routees.

    ConsistentHash

    Static helper class for creating ConsistentHash<T> instances.

    ConsistentHash.ConsistentHashingPoolSurrogate

    This class represents a surrogate of a ConsistentHashingPool router. Its main use is to help during the serialization process.

    ConsistentHash<T>

    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.

    ConsistentHash<T>.ConsistentHashingGroupSurrogate

    This class represents a surrogate of a ConsistentHashingGroup router. Its main use is to help during the serialization process.

    ConsistentHashableEnvelope

    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.

    ConsistentHashingGroup

    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.

    ConsistentHashingGroup.ConsistentHashingGroupSurrogate

    This class represents a surrogate of a ConsistentHashingGroup router. Its main use is to help during the serialization process.

    ConsistentHashingPool

    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

    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.

    ConsistentHashingPool.ConsistentHashingPoolSurrogate

    This class represents a surrogate of a ConsistentHashingPool router. Its main use is to help during the serialization process.

    ConsistentHashingRoutingLogic

    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.

    CustomRouterConfig

    If a custom router implementation is not a Group nor a Pool it may extend this base class.

    Deafen

    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.

    DefaultResizer

    Implementation of Resizer that adjust the Pool based on specified thresholds.

    FromConfig

    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

    FromConfig.FromConfigSurrogate

    This class represents a surrogate of a FromConfig router. Its main use is to help during the serialization process.

    GetRoutees

    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.

    Group

    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.

    Listen

    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.

    ListenerMessage

    This class represents a message sent by an actor to another actor that is listening to it.

    ListenerSupport

    This class adds IListeners capabilities to an actor.

    note

    ListenerReceive must be wired manually into the actor's OnReceive(object) method.

    NoRouter

    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).

    NoRouter.NoRouterSurrogate

    This class represents a surrogate of a NoRouter router. Its main use is to help during the serialization process.

    Pool

    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.

    RandomGroup

    This class represents a Group router that sends messages to a random Routee.

    RandomGroup.RandomGroupSurrogate

    This class represents a surrogate of a RandomGroup router. Its main use is to help during the serialization process.

    RandomLogic

    This class contains logic used by a Router to route a message to a random Routee.

    RandomPool

    This class represents a Pool router that sends messages to a random Routee.

    RandomPool.RandomPoolSurrogate

    This class represents a surrogate of a RandomPool router. Its main use is to help during the serialization process.

    RemoveRoutee

    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

    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.

    Resize

    Command used to resize a Akka.Routing.ResizablePoolActor

    Resizer

    Pool routers with dynamically resizable number of routees are implemented by providing a Resizer implementation in the Pool configuration

    RoundRobinGroup

    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

    For concurrent calls, round robin is just a best effort.

    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.

    RoundRobinGroup.RoundRobinGroupSurrogate

    This class represents a surrogate of a RoundRobinGroup router. Its main use is to help during the serialization process.

    RoundRobinPool

    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

    For concurrent calls, round robin is just a best effort.

    RoundRobinPool.RoundRobinPoolSurrogate

    This class represents a surrogate of a RoundRobinPool router. Its main use is to help during the serialization process.

    RoundRobinRoutingLogic

    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

    For concurrent calls, round robin is just a best effort.

    Routee

    Generic base class for routees.

    Routees

    This class represents a message used to carry information about what routees a Router is currently using.

    Router

    Implements a router - including:

    • The RoutingLogic
    • The Routees

    It's used internally by the routing system

    RouterConfig

    This class provides base functionality used in the creation and configuration of the various routers in the system.

    RouterEnvelope

    Used for some types of messages to separate router management messages from the actual content of messages sent to routees.

    RouterManagementMessage

    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.

    RouterMessage

    This class contains convenience methods used to send messages to a Router.

    RoutingLogic

    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.

    ScatterGatherFirstCompletedGroup

    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.

    ScatterGatherFirstCompletedGroup.ScatterGatherFirstCompletedGroupSurrogate

    This class represents a surrogate of a ScatterGatherFirstCompletedGroup router. Its main use is to help during the serialization process.

    ScatterGatherFirstCompletedPool

    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.

    ScatterGatherFirstCompletedPool.ScatterGatherFirstCompletedPoolSurrogate

    This class represents a surrogate of a ScatterGatherFirstCompletedPool router. Its main use is to help during the serialization process.

    ScatterGatherFirstCompletedRoutingLogic

    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.

    SeveralRoutees

    INTERNAL API

    SmallestMailboxPool

    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.

    SmallestMailboxPool.SmallestMailboxPoolSurrogate

    This class represents a surrogate of a SmallestMailboxPool router. Its main use is to help during the serialization process.

    SmallestMailboxRoutingLogic

    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

    Remote routees are consider lowest priority, since their mailbox size is unknown.

    note

    For the case, when all routees are of unpredictable size, the selection process fails back to round-robin.

    TailChopping

    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.

    TailChoppingGroup

    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.

    TailChoppingGroup.TailChoppingGroupSurrogate

    This class represents a surrogate of a TailChoppingGroup router. Its main use is to help during the serialization process.

    TailChoppingPool

    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.

    TailChoppingPool.TailChoppingPoolSurrogate

    This class represents a surrogate of a TailChoppingPool router. Its main use is to help during the serialization process.

    WithListeners

    This class represents a ListenerMessage instructing an IActorRef to perform a supplied Action<T> for all of its listeners.

    Interfaces

    IConsistentHashable

    This interface marks a given class as consistently hashable, for use with ConsistentHashingGroup or ConsistentHashingPool routers.

    IListeners

    This interface is needed to implement listening capabilities on an actor.

    • 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

    ConsistentHashMapping

    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.

    In this article
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET