-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][client] Move MessageIdAdv to the pulsar-common module #20139
[fix][client] Move MessageIdAdv to the pulsar-common module #20139
Conversation
### Motivation apache#19414 does not follow the design of apache#18950 > Since the aimed developers are Pulsar core developers, it's added in > the pulsar-common module (PulsarApi.proto is also in this module), not > the pulsar-client-api module. The reason is that `TopicMessageId#create` now cannot be a `MessageIdAdv` if `MessageIdAdv` is not in the `pulsar-client-api` module. ### Modifications - Move the `MessageIdAdv` class to the `pulsar-common` module. - Implement the `MessageIdAdv` interface in `TopicMessageIdImpl` instead of `TopicMessageId.Impl`. - Create a `TopicMessageIdImpl` instance for `TopicMessageId#create` via the `DefaultImplementation` class with the overhead of reflection.
We are in code freeze for 3.0. |
Yes. It's important to include this change in the 3.0.0 release so I added the 3.0.0 milestone. Otherwise, this change could be a terrible breaking change. BTW, I have also replied in the 3.0.0 candidate 2 verify mail list: https://lists.apache.org/thread/5bwg9dpcffnzvvgxc9dj1n44otmy81pf |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/TopicMessageIdImpl.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #20139 +/- ##
=============================================
+ Coverage 33.17% 72.95% +39.77%
- Complexity 12236 31945 +19709
=============================================
Files 1499 1868 +369
Lines 114413 138418 +24005
Branches 12431 15236 +2805
=============================================
+ Hits 37962 100977 +63015
+ Misses 71499 29415 -42084
- Partials 4952 8026 +3074
Flags with carried forward coverage won't be shown. Click here to find out more.
|
(cherry picked from commit 99a68e4)
I have cherry-picked this PR to branch-3.0. /cc @cbornet @RobertIndie |
Motivation
#19414 does not follow the design of #18950
The reason to made such changes in the previous PR was that
TopicMessageId#create
now cannot be aMessageIdAdv
ifMessageIdAdv
is not in thepulsar-client-api
module. However, it can be avoided.Modifications
MessageIdAdv
class to thepulsar-common
module.MessageIdAdv
interface inTopicMessageIdImpl
instead ofTopicMessageId.Impl
.TopicMessageIdImpl
instance forTopicMessageId#create
via theDefaultImplementation
class with the overhead of reflection.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: BewareMyPower#27