-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for multiple consumers across shards #42
Comments
hi @bryanpaluch there is the option to use In this case each process would need specify the shardID before kicking off the scan: c, err := consumer.New(*stream)
if err != nil {
log.Fatalf("consumer error: %v", err)
}
shardID := "SOME_AWS_SHARD_ID"
err = c.ScanShard(context.TODO(), shardID, func(r *consumer.Record) bool {
fmt.Println(string(r.Data))
return true // continue scanning
}) The checkpointing should work as expected (as the I created a placeholder for the idea of a consumer group, but I haven't found a real need for it yet so not sure what the timeframe on that would be: #36 |
+1 it would be nice for consumers to lock a shard that they are reading from without having to explicitly assign shards to consumers. |
Trying to unravel the desired functionality here a little... Seems like there are two ways to consume the stream:
For the latter case there would need to be some type of co-ordination between the consumers so they don't try to pick up the same shards. This would be akin to a "consumer group" which would need to store some state, and be able to auto-balance shards across consumers (I believe the the AWS KCL libraries support this functionality). |
+1 for consumer group support. Auto-balancing shards across consumers would be awesome. Snippet from the KCL docs on scaling:
|
@harlow and @vincent6767 - I would like to help with this feature. Do you guys already have an interface in mind or any other design considerations? |
Twitch's kinsumer library does this, it might give some ideas. |
Are there any updates on this? Saw that this is being worked on in the |
Hi @yeoji I'm afraid we lost traction on it. I'll remove that notice from the README for the time being |
Do you have any plans that would allow scaling this out across multiple processes which access multiple (but different) shards? I believe the checkpoint package would need an interface for locking access to a shard.
The text was updated successfully, but these errors were encountered: