object ShardingConsumerController
ShardingConsumerController is used together with ShardingProducerController. See the description
in that class or the Pekko 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 pekko.actor.typed.delivery.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
pekko.actor.typed.delivery.ConsumerController.Delivery to the protocol of the consumer actor.
Received messages from the producer are wrapped in pekko.actor.typed.delivery.ConsumerController.Delivery when sent to the consumer,
which is supposed to reply with pekko.actor.typed.delivery.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
- Alphabetic
- By Inheritance
- ShardingConsumerController
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[A, B](consumerBehavior: (ActorRef[Start[A]]) => Behavior[B]): Behavior[SequencedMessage[A]]
The
Behaviorof the entity that is to be initialized inClusterSharding.The
Behaviorof the entity that is to be initialized inClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def create[A, B](consumerBehavior: Function[ActorRef[Start[A]], Behavior[B]], settings: Settings): Behavior[SequencedMessage[A]]
Java API: The
Behaviorof the entity that is to be initialized inClusterSharding.Java API: The
Behaviorof the entity that is to be initialized inClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor. - def create[A, B](consumerBehavior: Function[ActorRef[Start[A]], Behavior[B]]): Behavior[SequencedMessage[A]]
Java API: The
Behaviorof the entity that is to be initialized inClusterSharding.Java API: The
Behaviorof the entity that is to be initialized inClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor. - def entityTypeKeyClass[A]: Class[SequencedMessage[A]]
Java API: The generic
Classtype forConsumerController.SequencedMessagethat can be used when creating anEntityTypeKeyfor theShardedConsumerControllerwithClass<EntityTypeKey<ConsumerController.SequencedMessage<MessageType>>>. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withSettings[A, B](settings: Settings)(consumerBehavior: (ActorRef[Start[A]]) => Behavior[B]): Behavior[SequencedMessage[A]]
The
Behaviorof the entity that is to be initialized inClusterSharding.The
Behaviorof the entity that is to be initialized inClusterSharding. It will manage the lifecycle and message delivery to the destination consumer actor. - object Settings