@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,
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, KinesisProxyV2Interface 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 configurationpublic RecordPublisher.RecordPublisherRunResult run(RecordPublisher.RecordBatchConsumer recordConsumer) throws InterruptedException
RecordPublisher
run
in interface RecordPublisher
recordConsumer
- the record batch consumer in which to output recordsInterruptedException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.