Closed dcelasun closed 5 years ago
(Merged master into this branch to get the update Travis CI changes.)
This is ready now, but #21 should be merged first.
Sorry for delays. I have updated master to build correctly if you want to run tests again.
If not I feel confident enough to merge this in.
@GarethLewin all tests are green, this can be merged.
On startup, if the metadata table is being created for the first time,
loadShardIDsFromDynamo()
call inrefreshShards()
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.