@Internal public class FanOutRecordPublisher extends Object implements RecordPublisher
RecordPublisher that will read and forward records from Kinesis using EFO, to the
subscriber. Records are consumed via Enhanced Fan Out subscriptions using SubscribeToShard API.RecordPublisher.RecordBatchConsumer, RecordPublisher.RecordPublisherRunResult| Constructor and Description |
|---|
FanOutRecordPublisher(StartingPosition startingPosition,
String consumerArn,
StreamShardHandle subscribedShard,
KinesisProxyAsyncV2Interface kinesisProxy,
FanOutRecordPublisherConfiguration configuration,
FullJitterBackoff backoff,
java.util.function.Supplier<Boolean> runningSupplier)
Instantiate a new FanOutRecordPublisher.
|
| Modifier and Type | Method and Description |
|---|---|
RecordPublisher.RecordPublisherRunResult |
run(RecordPublisher.RecordBatchConsumer recordConsumer)
Run the record publisher.
|
public FanOutRecordPublisher(StartingPosition startingPosition, String consumerArn, StreamShardHandle subscribedShard, KinesisProxyAsyncV2Interface kinesisProxy, FanOutRecordPublisherConfiguration configuration, FullJitterBackoff backoff, java.util.function.Supplier<Boolean> runningSupplier)
startingPosition - the position in the shard to start consuming fromconsumerArn - the consumer ARN of the stream consumersubscribedShard - the shard to consumer fromkinesisProxy - the proxy used to talk to Kinesis servicesconfiguration - the record publisher configurationrunningSupplier - a callback to query if the consumer is still runningpublic RecordPublisher.RecordPublisherRunResult run(RecordPublisher.RecordBatchConsumer recordConsumer) throws InterruptedException
RecordPublisherrun in interface RecordPublisherrecordConsumer - the record batch consumer in which to output recordsInterruptedExceptionCopyright © 2022–2024 The Apache Software Foundation. All rights reserved.