public class SequenceNumberValidator extends Object
validateSequenceNumber(String) which validates a sequence number by attempting to get an iterator from
Amazon Kinesis for that sequence number. (e.g. Before checkpointing a client provided sequence number in
RecordProcessorCheckpointer.checkpoint(String) to prevent invalid sequence numbers from being checkpointed,
which could prevent another shard consumer instance from processing the shard later on). This class also provides a
utility function isDigits(String) which is used to check whether a string is all digits| Constructor and Description |
|---|
SequenceNumberValidator(IKinesisProxy proxy,
String shardId,
boolean validateWithGetIterator)
Constructor.
|
public SequenceNumberValidator(IKinesisProxy proxy, String shardId, boolean validateWithGetIterator)
proxy - Kinesis proxy to be used for getIterator callshardId - ShardId to check with sequence numbersvalidateWithGetIterator - Whether to attempt to get an iterator for this shard id and the sequence numbers
being validatedCopyright © 2023. All rights reserved.