Class StartingPosition


  • @Internal
    public class StartingPosition
    extends Object
    The position in which to start consuming from a stream.
    • Method Detail

      • getShardIteratorType

        public com.amazonaws.services.kinesis.model.ShardIteratorType getShardIteratorType()
      • continueFromSequenceNumber

        public static StartingPosition continueFromSequenceNumber​(SequenceNumber sequenceNumber)
        Returns the starting position for the next record to consume from the given sequence number. The difference between restartFromSequenceNumber() and continueFromSequenceNumber() is that for restartFromSequenceNumber() aggregated records are reread to support subsequence failure.
        Parameters:
        sequenceNumber - the last successful sequence number, or sentinel marker
        Returns:
        the start position in which to consume from
      • restartFromSequenceNumber

        public static StartingPosition restartFromSequenceNumber​(SequenceNumber sequenceNumber)
        Returns the starting position to restart record consumption from the given sequence number after failure. The difference between restartFromSequenceNumber() and continueFromSequenceNumber() is that for restartFromSequenceNumber() aggregated records are reread to support subsequence failure.
        Parameters:
        sequenceNumber - the last successful sequence number, or sentinel marker
        Returns:
        the start position in which to consume from