Class ShardingConsumerController$
- java.lang.Object
-
- akka.cluster.sharding.typed.delivery.ShardingConsumerController$
-
public class ShardingConsumerController$ extends java.lang.Object
ShardingConsumerController
is used together withShardingProducerController
. 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 theActorRef
provided in the factory function of the consumerBehavior
. TheActorRef
in theStart
message is typically constructed as a message adapter to map theConsumerController.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 withConsumerController.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 severalDelivery
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.
-
-
Field Summary
Fields Modifier and Type Field Description static ShardingConsumerController$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description ShardingConsumerController$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A,B>
Behavior<ConsumerController.SequencedMessage<A>>apply(scala.Function1<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior)
TheBehavior
of the entity that is to be initialized inClusterSharding
.<A,B>
Behavior<ConsumerController.SequencedMessage<A>>create(java.util.function.Function<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior)
Java API: TheBehavior
of the entity that is to be initialized inClusterSharding
.<A,B>
Behavior<ConsumerController.SequencedMessage<A>>create(java.util.function.Function<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior, ShardingConsumerController.Settings settings)
Java API: TheBehavior
of the entity that is to be initialized inClusterSharding
.<A> java.lang.Class<ConsumerController.SequencedMessage<A>>
entityTypeKeyClass()
Java API: The genericClass
type forConsumerController.SequencedMessage
that can be used when creating anEntityTypeKey
for theShardedConsumerController
withClass
.>> <A,B>
Behavior<ConsumerController.SequencedMessage<A>>withSettings(ShardingConsumerController.Settings settings, scala.Function1<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior)
TheBehavior
of the entity that is to be initialized inClusterSharding
.
-
-
-
Field Detail
-
MODULE$
public static final ShardingConsumerController$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
apply
public <A,B> Behavior<ConsumerController.SequencedMessage<A>> apply(scala.Function1<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior)
TheBehavior
of the entity that is to be initialized inClusterSharding
. It will manage the lifecycle and message delivery to the destination consumer actor.
-
withSettings
public <A,B> Behavior<ConsumerController.SequencedMessage<A>> withSettings(ShardingConsumerController.Settings settings, scala.Function1<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior)
TheBehavior
of the entity that is to be initialized inClusterSharding
. It will manage the lifecycle and message delivery to the destination consumer actor.
-
create
public <A,B> Behavior<ConsumerController.SequencedMessage<A>> create(java.util.function.Function<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior)
Java API: TheBehavior
of the entity that is to be initialized inClusterSharding
. It will manage the lifecycle and message delivery to the destination consumer actor.
-
create
public <A,B> Behavior<ConsumerController.SequencedMessage<A>> create(java.util.function.Function<ActorRef<ConsumerController.Start<A>>,Behavior<B>> consumerBehavior, ShardingConsumerController.Settings settings)
Java API: TheBehavior
of the entity that is to be initialized inClusterSharding
. It will manage the lifecycle and message delivery to the destination consumer actor.
-
entityTypeKeyClass
public <A> java.lang.Class<ConsumerController.SequencedMessage<A>> entityTypeKeyClass()
Java API: The genericClass
type forConsumerController.SequencedMessage
that can be used when creating anEntityTypeKey
for theShardedConsumerController
withClass
.>>
-
-