@Internal public class PollingRecordPublisher extends Object implements RecordPublisher
RecordPublisher
that will read records from Kinesis and forward them to the subscriber.
Records are consumed by polling the GetRecords KDS API using a ShardIterator.RecordPublisher.RecordBatchConsumer, RecordPublisher.RecordPublisherRunResult
Modifier and Type | Method and Description |
---|---|
RecordPublisher.RecordPublisherRunResult |
run(RecordPublisher.RecordBatchConsumer consumer)
Run the record publisher.
|
RecordPublisher.RecordPublisherRunResult |
run(RecordPublisher.RecordBatchConsumer consumer,
int maxNumberOfRecords) |
public RecordPublisher.RecordPublisherRunResult run(RecordPublisher.RecordBatchConsumer consumer) throws InterruptedException
RecordPublisher
run
in interface RecordPublisher
consumer
- the record batch consumer in which to output recordsInterruptedException
public RecordPublisher.RecordPublisherRunResult run(RecordPublisher.RecordBatchConsumer consumer, int maxNumberOfRecords) throws InterruptedException
InterruptedException
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.