public class ConsumerControllerImpl$ extends java.lang.ObjectINTERNAL API
==== Design notes ====
The destination consumer will start the flow by sending an initial
Startmessage to the
ProducerControllersends the first message to the
ConsumerControllerwithout waiting for a
ConsumerController. The main reason for this is that when used with Cluster Sharding the first message will typically create the
ConsumerController. It's also a way to connect the ProducerController and ConsumerController in a dynamic way, for example when the ProducerController is replaced.
ProducerControllerto specify it's ready to receive up to the requested sequence number.
ConsumerControllersends the first
Requestwhen it receives the first
SequencedMessageand has received the
Startmessage from the consumer.
It sends new
Requestwhen half of the requested window is remaining, but it also retries the
Requestif no messages are received because that could be caused by lost messages.
Apart from the first message the producer will not send more messages than requested.
Received messages are wrapped in
ConsumerController.Deliverywhen sent to the consumer, which is supposed to reply with
ConsumerController.Confirmedwhen it has processed the message. Next message is not delivered until the previous is confirmed. More messages from the producer that arrive while waiting for the confirmation are stashed by the
ConsumerControllerand delivered when previous message was confirmed.
In other words, the "request" protocol to the application producer and consumer is one-by-one, but between the
ConsumerControllerit's window of messages in flight.
The consumer and the
ConsumerControllerare supposed to be local so that these messages are fast and not lost.
ConsumerControllerreceives a message with unexpected sequence number (not previous + 1) it sends
ProducerControllerand will ignore all messages until the expected sequence number arrives.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
apply(scala.Option<ServiceKey<ConsumerController.Command<A>>> serviceKey, ConsumerController.Settings settings)
public static final ConsumerControllerImpl$ MODULE$Static reference to the singleton instance of this Scala object.