Search Results for

    Show / Hide Table of Contents

    Class ShardingConsumerController

    ShardingConsumerController is used together with ShardingProducerController.

    ShardingConsumerController is the entity actor that is initialized via ClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor (your actor type specified via Props in the Create<T>(Func<IActorRef, Props>, Settings) method.)

    The destination consumer actor will start the flow by sending an initial ConsumerController.Start<T> message to the ShardingConsumerController, its parent actor.

    Received messages from the producer are wrapped in a ConsumerController.Delivery<T> message and sent to the destination consumer actor, which is supposed to reply with ConsumerController.Confirmed when it has successfully processed the message.

    Next message from the producer will not be delivered until the destination consumer actor has confirmed the previous message. However, since there can be several producers, e.g. one per node, sending messages to the same destination entity actor there can be multiple ConsumerController.Delivery<T> messages in flight at the same time.

    More messages from a specific producer that arrive while waiting for the confirmation are stashed by the ConsumerController and delivered when the previous messages are confirmed.

    Inheritance
    object
    ShardingConsumerController
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Cluster.Sharding.Delivery
    Assembly: Akka.Cluster.Sharding.dll
    Syntax
    public static class ShardingConsumerController

    Methods

    | Edit this page View Source

    Create<T>(Func<IActorRef, Props>, Settings)

    Creates a new instance of ShardingConsumerController props for the given entity and type of message.

    Declaration
    public static Props Create<T>(Func<IActorRef, Props> consumerProps, ShardingConsumerController.Settings settings)
    Parameters
    Type Name Description
    Func<IActorRef, Props> consumerProps

    A function that passes in the ShardingConsumerController actor reference in exchange for the consumer's Props.

    ShardingConsumerController.Settings settings

    The settings for the ShardingConsumerController.

    Returns
    Type Description
    Props

    The props used to start this entity.

    Type Parameters
    Name Description
    T

    The type of message for which we will be guaranteeing delivery.

    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