diff --git a/consumer.go b/consumer.go index 676073a..d2f4b2b 100644 --- a/consumer.go +++ b/consumer.go @@ -225,9 +225,9 @@ func (c *Consumer) getShardIterator(streamName, shardID, seqNum string) (*string StreamName: aws.String(streamName), } - if lastSeqNum != "" { + if seqNum != "" { params.ShardIteratorType = aws.String(kinesis.ShardIteratorTypeAfterSequenceNumber) - params.StartingSequenceNumber = aws.String(lastSeqNum) + params.StartingSequenceNumber = aws.String(seqNum) } else { params.ShardIteratorType = aws.String(c.initialShardIteratorType) }