Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fetch shard IDs from Kinesis if DynamoDB cache is empty (#22)
* Skip shard ID cache on first run On startup, if the metadata table is being created for the first time, the loadShardIDsFromDynamo() call in refreshShards() will always return an empty shard list. This causes the consumer to wait until the next leader election to start receiving events, because that's the only time loadShardIDsFromKinesis() is called. By default, this happens once a minute, which means the consumer basically sleeps for 1 minute on first run. This commit fixes that by adding a first run flag and skipping the cache if it's true. Fixes #17. * Remove first run check
- Loading branch information