-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Delete PartitionedConsumerImpl, use TopicsConsumerImpl instead #1365
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
Conversation
93efef6 to
fceab10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason that topic is removed before closing the actual consumers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, Thanks, will move it into line 746, when all consumers closed.
45a9637 to
001dd09
Compare
|
rebased master, checked no leaking change in PartitionedConsumerImpl |
|
retest this please |
1 similar comment
|
retest this please |
|
@merlimat Would you please help review this? |
merlimat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the PartitionedConsumerImpl class being removed in this PR. Is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could also rename TopicsConsumerImpl into MultiTopicsConsumerImpl, because TopicsConsumerImpl doesn't immediately convey that it's working on a collection of topics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does TopicsConsumerImpl discover the partitions it has to use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is similar to what we did in partitioned consumer, mainly by getPartitionedTopicMetadata.
In TopicsConsumerImpl we call subscribeAsync(topic) for the topic in conf, and this will call getPartitionedTopicMetadata again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, though since we already know the number of partitions, we already know the list of partition names. Couldn't we just build the list and pass it on to the MultiTopicsConsumerImpl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will do the change to avoid the dup calling of get metadata.
001dd09 to
f4f3b1e
Compare
|
@merlimat, thanks for the review. |
merlimat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good. I just have one comment on the initialization path.
920a966 to
ff2b969
Compare
|
seems CI build error could fix with #1489, may need retry after it merged |
|
retest this please |
|
@zhaijack please merge this branch with master to get the compilation fixed |
|
Seems there was no conflict, lt should be well. |
ff2b969 to
0aaa48c
Compare
merlimat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…sConsumerImpl instead (#16969) ### Motivation The code of the C++ client is still relatively old, after #1365, the java client used `MultiTopicConsumerImpl` instead of `PartitionedConsumerImpl`. ### Modifications - Delete PartitionedConsumerImpl, use MultiTopicsConsumerImpl instead. - For MultiTopicConsumerImpl, support seek message and topic partition listener feature.
…sConsumerImpl instead (#16969) ### Motivation The code of the C++ client is still relatively old, after #1365, the java client used `MultiTopicConsumerImpl` instead of `PartitionedConsumerImpl`. ### Modifications - Delete PartitionedConsumerImpl, use MultiTopicsConsumerImpl instead. - For MultiTopicConsumerImpl, support seek message and topic partition listener feature. (cherry picked from commit 3a3ae23)
…sConsumerImpl instead (#16969) ### Motivation The code of the C++ client is still relatively old, after #1365, the java client used `MultiTopicConsumerImpl` instead of `PartitionedConsumerImpl`. ### Modifications - Delete PartitionedConsumerImpl, use MultiTopicsConsumerImpl instead. - For MultiTopicConsumerImpl, support seek message and topic partition listener feature. (cherry picked from commit 3a3ae23)
…sConsumerImpl instead (#16969) ### Motivation The code of the C++ client is still relatively old, after #1365, the java client used `MultiTopicConsumerImpl` instead of `PartitionedConsumerImpl`. ### Modifications - Delete PartitionedConsumerImpl, use MultiTopicsConsumerImpl instead. - For MultiTopicConsumerImpl, support seek message and topic partition listener feature. (cherry picked from commit 3a3ae23)
…sConsumerImpl instead (#16969) ### Motivation The code of the C++ client is still relatively old, after #1365, the java client used `MultiTopicConsumerImpl` instead of `PartitionedConsumerImpl`. ### Modifications - Delete PartitionedConsumerImpl, use MultiTopicsConsumerImpl instead. - For MultiTopicConsumerImpl, support seek message and topic partition listener feature. (cherry picked from commit 3a3ae23)
…sConsumerImpl instead (apache#16969) ### Motivation The code of the C++ client is still relatively old, after apache#1365, the java client used `MultiTopicConsumerImpl` instead of `PartitionedConsumerImpl`. ### Modifications - Delete PartitionedConsumerImpl, use MultiTopicsConsumerImpl instead. - For MultiTopicConsumerImpl, support seek message and topic partition listener feature. (cherry picked from commit 3a3ae23) (cherry picked from commit 23da64b)
Motivation
Currently we have both TopicsConsumerImpl and PartitionedConsumerImpl. The behaviour and code of them are similar: contains a list of ConsumerImpl and make them work together. This PR tries to delete PartitionedConsumerImpl and use TopicsConsumerImpl instead.
Modifications
Delete PartitionedConsumerImpl, use TopicsConsumerImpl instead.
Fix errors in TopicsConsumerImpl.
Result
No api changes.