object ShardingConsumerController
- Alphabetic
- By Inheritance
- ShardingConsumerController
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def apply[A, B](consumerBehavior: ([Start[A]]) => Behavior[B]): [SequencedMessage[A]]
The
Behavior
of the entity that is to be initialized inClusterSharding
.The
Behavior
of 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: [[Start[A]], Behavior[B]], settings: Settings): [SequencedMessage[A]]
Java API: The
Behavior
of the entity that is to be initialized inClusterSharding
.Java API: The
Behavior
of 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: [[Start[A]], Behavior[B]]): [SequencedMessage[A]]
Java API: The
Behavior
of the entity that is to be initialized inClusterSharding
.Java API: The
Behavior
of 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
Class
type forConsumerController.SequencedMessage
that can be used when creating anEntityTypeKey
for theShardedConsumerController
withClass<EntityTypeKey<ConsumerController.SequencedMessage<MessageType>>>
. - def withSettings[A, B](settings: Settings)(consumerBehavior: ([Start[A]]) => Behavior[B]): [SequencedMessage[A]]
The
Behavior
of the entity that is to be initialized inClusterSharding
.The
Behavior
of the entity that is to be initialized inClusterSharding
. It will manage the lifecycle and message delivery to the destination consumer actor. - object Settings
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 inClusterSharding
. 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 consumerBehavior
. TheActorRef
in theStart
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 theConsumerController
and delivered when previous message was confirmed.