Class ShardingProducerController.RequestNext<A>

java.lang.Object
org.apache.pekko.cluster.sharding.typed.delivery.ShardingProducerController.RequestNext<A>
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product
Enclosing class:
ShardingProducerController

public static final class ShardingProducerController.RequestNext<A> extends Object implements scala.Product, Serializable
The ProducerController sends RequestNext to the producer when it is allowed to send one message via the sendNextTo or askNextTo. It should wait for next RequestNext before sending one more message.

entitiesWithDemand contains information about which entities that have demand. It is allowed to send to a new entityId that is not included in the entitiesWithDemand. If sending to an entity that doesn't have demand the message will be buffered, and that can be seen in the bufferedForEntitiesWithoutDemand.

This support for buffering means that it is even allowed to send several messages in response to one RequestNext but it's recommended to only send one message and wait for next RequestNext before sending more messages.

See Also: