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

[fix] peek message will return -1 for partitionIndex #1267

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

shibd
Copy link
Member

@shibd shibd commented Aug 8, 2024

Motivation

If peek a partitioned topic, will see a message id: 7316:0:-1:-1, the parititonIndex should not be -1.

pulsarctl subscription peek --count 10 persistent://public/default/my-topic-partition-0 test-sub
Message ID : 7316:0:-1:-1
Properties :
{
    "publish-time": "2024-08-08T17:50:39.476+08:00"
}
Message :
00000000  68 65 6c 6c 6f 2d 31                              |hello-1|

Modifications

  • Set partition index on peek message.

Verifying this change

Add TestPeekMessageForPartitionedTopic to cover it.

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@shibd shibd requested a review from RobertIndie August 8, 2024 12:42
@shibd shibd self-assigned this Aug 8, 2024
@RobertIndie RobertIndie changed the title fix: peek message will return -1 for partitionIndex [fix] peek message will return -1 for partitionIndex Aug 13, 2024
@RobertIndie RobertIndie added this to the v0.14.0 milestone Aug 13, 2024
@RobertIndie RobertIndie merged commit ab042ae into apache:master Aug 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants