-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Question - "dynamic subscriptions" for direct consumer #475
Comments
Sorry for the delay. Are you using a consumer group or no? If you are using a direct consumer: can you use a combination of
I think None of this applies for a group consumer, because as a group consumer you do not actually own which partitions you are consuming. Let me know if the above add / pause / resume idea works. I'll consider |
There are some catches, but this isn't too bad. Closes #475.
There are some catches, but this isn't too bad. Closes #475.
Hello - I have a question about the proper usage pattern of the kgo client in a situation where a given client may need to start and stop consumption of (many different) individual partitions over the course of its lifetime. In brief, we have a way of externally assigning partitions for consumption (either as active or standby) - in either case the partition must be consumed, but the contents may be treated differently. Over time, active or standby partitions may be assigned or unassigned to a given instance as load characteristics change.
Is there a way - easy, or even just correct - of handling this with a single long-lived
kgo.Client
? It seems like it should be possible to add (and remove) individual partition subscriptions in a running client without affecting the pipeline of fetched/buffered records for other partitions, but I can't see how to do it given the public API of the client. Our current approach is to close and recreate the client entirely when any partition subscriptions change, but this seems a little harsh in order to, for example, add the 100th partition subscription (because it could involve re-fetching any buffered data for the 99 other partition subscriptions that didn't change).In particular, I guess I'm looking for something like
AddConsumePartitions
andPurgePartitionsFromClient
that work at a partition level rather than a whole-topic level.The text was updated successfully, but these errors were encountered: