@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,
KinesisProxyV2Interface kinesisProxy,
FanOutRecordPublisherConfiguration configuration,
FullJitterBackoff backoff)
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, KinesisProxyV2Interface kinesisProxy, FanOutRecordPublisherConfiguration configuration, FullJitterBackoff backoff)
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 configurationpublic RecordPublisher.RecordPublisherRunResult run(RecordPublisher.RecordBatchConsumer recordConsumer) throws InterruptedException
RecordPublisherrun in interface RecordPublisherrecordConsumer - the record batch consumer in which to output recordsInterruptedExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.