Skip to content
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

[feat][admin] PIP-330: getMessagesById gets all messages #21918

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

nodece
Copy link
Member

@nodece nodece commented Jan 18, 2024

PIP: #21873

Motivation

The org.apache.pulsar.client.admin.Topics provides getMessageById(java.lang.String, long, long) method to get the
message, which returns one message. If the message id refers to a batch message, we can only get the first message, not
all messages.

This behavior affects our analysis of messages by the message id.

Modifications

  • Add getMessagesById and getMessagesByIdAsync methods to the org.apache.pulsar.client.admin.Topics interface.
  • Implement new methods in the org.apache.pulsar.client.admin.internal.TopicsImpl

Verifying this change

The testGetMessagesId test has been added.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 18, 2024
@nodece nodece added this to the 3.3.0 milestone Jan 18, 2024
@nodece nodece self-assigned this Jan 18, 2024
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece
Copy link
Member Author

nodece commented Jan 20, 2024

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (55520bd) 73.53% compared to head (35ad9a3) 73.61%.
Report is 6 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #21918      +/-   ##
============================================
+ Coverage     73.53%   73.61%   +0.07%     
+ Complexity    32406    32404       -2     
============================================
  Files          1861     1861              
  Lines        138587   138588       +1     
  Branches      15185    15185              
============================================
+ Hits         101916   102023     +107     
+ Misses        28804    28680     -124     
- Partials       7867     7885      +18     
Flag Coverage Δ
inttests 24.11% <0.00%> (?)
systests 23.67% <0.00%> (-0.03%) ⬇️
unittests 72.90% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...in/java/org/apache/pulsar/client/admin/Topics.java 77.50% <ø> (ø)
...pache/pulsar/client/admin/internal/TopicsImpl.java 81.65% <100.00%> (+0.01%) ⬆️

... and 86 files with indirect coverage changes

@nodece nodece merged commit 22f7323 into apache:master Jan 22, 2024
52 checks passed
RobertIndie added a commit to apache/pulsar-client-go that referenced this pull request Mar 8, 2024
### Motivation
To keep consistent with the Java client.

Releted PR: apache/pulsar#21918


### Modifications

Add `getMessagesById` interface.

---------

Co-authored-by: Zike Yang <zike@apache.org>
nodece added a commit to ascentstream/pulsar that referenced this pull request Dec 18, 2024
Signed-off-by: Zixuan Liu <nodeces@gmail.com>

(cherry picked from commit 22f7323)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece nodece deleted the pip-330-impl branch December 18, 2024 04:54
nodece added a commit to ascentstream/pulsar that referenced this pull request Dec 18, 2024
Signed-off-by: Zixuan Liu <nodeces@gmail.com>

(cherry picked from commit 22f7323)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants