Packages

o

akka.cluster.sharding.typed.delivery

ShardingConsumerController

object ShardingConsumerController

ShardingConsumerController is used together with ShardingProducerController. See the description in that class or the Akka reference documentation for how they are intended to be used.

ShardingConsumerController is the entity that is initialized in ClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor.

The destination consumer actor will start the flow by sending an initial ConsumerController.Start message via the ActorRef provided in the factory function of the consumer Behavior. The ActorRef in the Start message is typically constructed as a message adapter to map the ConsumerController.Delivery to the protocol of the consumer actor.

Received messages from the producer are wrapped in ConsumerController.Delivery when sent to the consumer, which is supposed to reply with ConsumerController.Confirmed when it has processed the message. Next message from a specific producer is not delivered until the previous is confirmed. However, since there can be several producers, e.g. one per node, sending to the same destination entity there can be several Delivery 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 previous message was confirmed.

Annotations
@ApiMayChange()
Source
ShardingConsumerController.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ShardingConsumerController
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class Settings extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[A, B](consumerBehavior: (ActorRef[Start[A]]) => Behavior[B]): Behavior[SequencedMessage[A]]

    The Behavior of the entity that is to be initialized in ClusterSharding.

    The Behavior of the entity that is to be initialized in ClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def create[A, B](consumerBehavior: Function[ActorRef[Start[A]], Behavior[B]], settings: Settings): Behavior[SequencedMessage[A]]

    Java API: The Behavior of the entity that is to be initialized in ClusterSharding.

    Java API: The Behavior of the entity that is to be initialized in ClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor.

  8. def create[A, B](consumerBehavior: Function[ActorRef[Start[A]], Behavior[B]]): Behavior[SequencedMessage[A]]

    Java API: The Behavior of the entity that is to be initialized in ClusterSharding.

    Java API: The Behavior of the entity that is to be initialized in ClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor.

  9. def entityTypeKeyClass[A]: Class[SequencedMessage[A]]

    Java API: The generic Class type for ConsumerController.SequencedMessage that can be used when creating an EntityTypeKey for the ShardedConsumerController with Class<EntityTypeKey<ConsumerController.SequencedMessage<MessageType>>>.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. def withSettings[A, B](settings: Settings)(consumerBehavior: (ActorRef[Start[A]]) => Behavior[B]): Behavior[SequencedMessage[A]]

    The Behavior of the entity that is to be initialized in ClusterSharding.

    The Behavior of the entity that is to be initialized in ClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor.

  24. object Settings

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped