Skip to content

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

Merged
RobertIndie merged 1 commit into
apache:masterfrom
shibd:fix_peek_message
Aug 13, 2024
Merged

RobertIndie merged 1 commit into
apache:masterfrom
shibd:fix_peek_message

Conversation

@shibd

@shibd shibd commented Aug 8, 2024 •

Copy link
Copy Markdown
Member

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
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.

2 participants