public StreamingSubscriberConnection(
String subscription,
MessageReceiver receiver,
Duration ackExpirationPadding,
Duration maxAckExtensionPeriod,
Distribution ackLatencyDistribution,
SubscriberStub stub,
int channelAffinity,
FlowController flowController,
Deque<MessageDispatcher.OutstandingMessageBatch> outstandingMessageBatches,
ScheduledExecutorService executor,
ScheduledExecutorService systemExecutor,
ApiClock clock) {
this.subscription = subscription;
this.systemExecutor = systemExecutor;
this.stub = stub;
this.channelAffinity = channelAffinity;
this.messageDispatcher =
new MessageDispatcher(
receiver,
this,
ackExpirationPadding,
maxAckExtensionPeriod,
ackLatencyDistribution,
flowController,
outstandingMessageBatches,
executor,
systemExecutor,
clock);
}