Search Results for

    Show / Hide Table of Contents

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

    Inheritance
    object
    RouterConfig
    Group
    TailChoppingGroup
    Implements
    ISurrogated
    IEquatable<RouterConfig>
    IEquatable<Group>
    Inherited Members
    Group.Props()
    Group.CreateRouterActor()
    Group.Equals(Group)
    Group.Equals(object)
    Group.GetHashCode()
    RouterConfig.RouterDispatcher
    RouterConfig.RoutingLogicController(RoutingLogic)
    RouterConfig.IsManagementMessage(object)
    RouterConfig.StopRouterWhenAllRouteesRemoved
    RouterConfig.WithFallback(RouterConfig)
    RouterConfig.VerifyConfig(ActorPath)
    RouterConfig.Equals(RouterConfig)
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Routing
    Assembly: Akka.dll
    Syntax
    public sealed class TailChoppingGroup : Group, ISurrogated, IEquatable<RouterConfig>, IEquatable<Group>

    Constructors

    | Edit this page View Source

    TailChoppingGroup(Config)

    Initializes a new instance of the TailChoppingGroup class.

    Declaration
    public TailChoppingGroup(Config config)
    Parameters
    Type Name Description
    Config config

    The configuration to use to lookup paths used by the group router.

    note

    If 'routees.path' is defined in the provided configuration then those paths will be used by the router. If 'within' is defined in the provided configuration then that will be used as the timeout. If 'tail-chopping-router.interval' is defined in the provided configuration then that will be used as the interval.

    | Edit this page View Source

    TailChoppingGroup(IEnumerable<string>, TimeSpan, TimeSpan)

    Initializes a new instance of the TailChoppingGroup class.

    Declaration
    public TailChoppingGroup(IEnumerable<string> routeePaths, TimeSpan within, TimeSpan interval)
    Parameters
    Type Name Description
    IEnumerable<string> routeePaths

    The actor paths used by this router during routee selection.

    TimeSpan within

    The amount of time to wait for a response.

    TimeSpan interval

    The interval to wait before sending to the next routee.

    | Edit this page View Source

    TailChoppingGroup(IEnumerable<string>, TimeSpan, TimeSpan, string)

    Initializes a new instance of the TailChoppingGroup class.

    Declaration
    public TailChoppingGroup(IEnumerable<string> routeePaths, TimeSpan within, TimeSpan interval, string routerDispatcher)
    Parameters
    Type Name Description
    IEnumerable<string> routeePaths

    The actor paths used by this router during routee selection.

    TimeSpan within

    The amount of time to wait for a response.

    TimeSpan interval

    The interval to wait before sending to the next routee.

    string routerDispatcher

    The dispatcher to use when passing messages to the routees.

    Properties

    | Edit this page View Source

    Interval

    The amount of time to wait before sending to the next routee.

    Declaration
    public TimeSpan Interval { get; }
    Property Value
    Type Description
    TimeSpan
    | Edit this page View Source

    Within

    The amount of time to wait for a response.

    Declaration
    public TimeSpan Within { get; }
    Property Value
    Type Description
    TimeSpan

    Methods

    | Edit this page View Source

    CreateRouter(ActorSystem)

    Creates a router that is responsible for routing messages to routees within the provided system.

    Declaration
    public override Router CreateRouter(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    The actor system that owns this router.

    Returns
    Type Description
    Router

    The newly created router tied to the given system.

    Overrides
    RouterConfig.CreateRouter(ActorSystem)
    | Edit this page View Source

    GetPaths(ActorSystem)

    Retrieves the actor paths used by this router during routee selection.

    Declaration
    public override IEnumerable<string> GetPaths(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    The actor system that owns this router.

    Returns
    Type Description
    IEnumerable<string>

    An enumeration of actor paths used during routee selection

    Overrides
    Group.GetPaths(ActorSystem)
    | Edit this page View Source

    ToSurrogate(ActorSystem)

    Creates a surrogate representation of the current TailChoppingGroup.

    Declaration
    public override ISurrogate ToSurrogate(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    The actor system that owns this router.

    Returns
    Type Description
    ISurrogate

    The surrogate representation of the current TailChoppingGroup.

    Overrides
    RouterConfig.ToSurrogate(ActorSystem)
    | Edit this page View Source

    WithDispatcher(string)

    Creates a new TailChoppingGroup router with a given dispatcher id.

    note

    This method is immutable and returns a new instance of the router.

    Declaration
    public TailChoppingGroup WithDispatcher(string dispatcher)
    Parameters
    Type Name Description
    string dispatcher

    The dispatcher id used to configure the new router.

    Returns
    Type Description
    TailChoppingGroup

    A new router with the provided dispatcher id.

    Implements

    ISurrogated
    IEquatable<T>
    IEquatable<T>

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    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