kinesis-sql
kinesis-sql copied to clipboard
Fix listShards to only specify nextToken
This fixes two bugs:
- If
listShardsreturns multiple pages, then we run into an infinite loop withwhile (!nextToken.isEmpty), becausenextTokenwill never be set back tonullbecause:
if (returnedToken != null) {
nextToken = returnedToken
listShardscannot allow bothStreamNameandNextTokento be specified together.
@itsvikramagr this is tested against streams with >1k shards which forces paging on the Kinesis API
Does this read the equal number of messages too ? because I see there is a data skew.