Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
Let's just say I added a shard to my kinesis config and the only way to get production working again was to code this in a blitz!
I am only running one peer in my operations here but I have written the algorithm such that it should be capable of distributing consistently over n-peers. Of course any changes to n-peers if the job is resumed may risk reshuffling the partitions around, but it seems logically unavoidable in that case. It may be possible to keep the partitioning consistent even in the case of new shards getting opened, but I have not gone that far. This should be sufficent for #6
hasMoreShards support would be pretty trivial to add following this implementation as in #2 and I am not sure how the split/merge logic works (as in #1) or if it's even necessary. When a shard gets closed in Kinesis we still load it in our .getShards call and poll from it as long as it's there.