-
Notifications
You must be signed in to change notification settings - Fork 0
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
[improve][client] PIP-229: Add a common interface to get fields of the MessageIdData #19
base: master
Are you sure you want to change the base?
Conversation
3ac0ce6
to
f9d7ad6
Compare
bf14ea8
to
34fa858
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #19 +/- ##
=========================================
Coverage ? 63.46%
Complexity ? 25850
=========================================
Files ? 1822
Lines ? 133142
Branches ? 14673
=========================================
Hits ? 84497
Misses ? 40892
Partials ? 7753
Flags with carried forward coverage won't be shown. Click here to find out more. |
bb7e64e
to
fdd32c0
Compare
f02339d
to
6d1f61b
Compare
2270912
to
6863357
Compare
6863357
to
476e7e8
Compare
…ssageIdData Master issue: apache#18950 ### Motivation We need a common interface to get fields of the MessageIdData. After that, we won't need to assert a MessageId implementation is an instance of a specific class. And we can pass our customized MessageId implementation to APIs like `acknowledge` and `seek`. ### Modifications - Add `MessageIdAdv` to get fields of `MessageIdData`, make all MessageId implementations inherit it (except `MultiMessageIdImpl`). - Add `MessageIdAdvUtils` for the most common used methods. - Replace `BatchMessageAcker` with the `BitSet` for ACK. - Remove `TopicMessageIdImpl#getInnerMessageId` since a `TopicMessageIdImpl` can be treated as its underlying `MessageId` implementation now. - Remove `instanceof BatchMessageIdImpl` checks in `pulsar-client` module by casting to `MessageIdAdv`. After this refactoring, the 3rd party library will no longer need to cast a `MessageId` to a specific implementation. It only needs to cast `MessageId` to `MessageIdAdv`. Users can also implement their own util class so the methods of `MessageIdAdvUtils` are all not public. ### Verifications Add `CustomMessageIdTest` to verify a simple MessageIdAdv implementation that only has the (ledger id, entry id, batch idx, batch size) fields also works for seek and acknowledgment.
476e7e8
to
64185ac
Compare
The pr had no activity for 30 days, mark with Stale label. |
TODO:
BatchMessageAcker
.