-
Notifications
You must be signed in to change notification settings - Fork 102
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
Supports multi-topic in CommittableOffsetBatch #1041
base: series/2.x
Are you sure you want to change the base?
Conversation
3601e49
to
67cde6c
Compare
67cde6c
to
ea31b9b
Compare
Hi @bplommer did you have the chance to take a look at this? |
Hi @geirolz! I've read this PR and the issue #347 and I'm confused about the usage of Topics and Consumer Groups. I'm trying to understand why current For sure I'm missing something (and I'd assume that the issue comes when using multiple Consumer Groups, not Topics, correct me if I'm wrong). If If that's the case, I'd say that this is something to be handled in user land 🤔 Because by reading the Scaladoc of
The key point is: |
Hi @aartigao, I've noticed this problem in my previous company. We where consuming from multiple topics merging all messages into one single stream consumed by and internal processor, once processed we had to commit and here the problem came out. Moreover as #347 this behaviour it's a bit implicit by semantic. I don't see the disadvantages of supporting this but I may missed something since it was quite easy to implement. I wonder what's the reason behind this design decision then |
Thanks for sharing the graph, now to me it makes sense what's happening. Most probably those consumers have a different Consumer Group, right? I'd need to dig deep on this when I have time but I'm afraid that depending on how the underlying Kafka Client works it may not be possible to fix this at lib level. That would explain the decision to support a single Consumer Group only. Also, just to give more context, a Consumer Group can manage multiple Topics offsets (in fact, multiple TopicPartition). Maybe the case in your company's design was to have a 1:1 relation between Topic and Consumer Group, but that's not the general case. This is where I was confused about before, by looking at the PR implementation using the Topic name as the Map's key. But maybe I'm wrong, ofc 😅 I'll try to clarify the situation. In the meantime, thanks for giving your time to create and clarify this PR 🙌🏼 |
The purpose of this PR is to resolve issue #347 at its root allowing the
CommittableOffsetBatch
to process records from different topics.It's very useful when you consume from multiple topics merging the streams.
I didn't address the tests for now, I'll do asap, I the meanwhile let me know what you think about the solution.
Open points:
commit
action for a specific topic. Any suggestions?