pulsarctl icon indicating copy to clipboard operation
pulsarctl copied to clipboard

feat: add the partitionKey to the messages

Open benjamin99 opened this issue 2 years ago • 3 comments

Motivation

In my usage, I need to get the partition key of the messages, which is not currently supported in the pulsarctl. The PR added the instruction to load partition key from the SingleMessageMetadata in the getIndividualMsgsFromBatch method, so the resulting messages would contain the corresponding partition keys.

Modifications

  • added the PartitionKey to the message model.
  • adjusted the getIndividualMsgsFromBatch method to load the partition key to the resulting messages.

Verifying this change

  • [x] Make sure that the change passes the CI checks.

  • not sure the tests is required for the PR, since not seeing any message related tests in the current codebase (if I miss out anything, please let me know and I will complete the tests ASAP).

Documentation

Check the box below.

Need to update docs?

  • [ ] doc-required

  • [x] no-need-doc

    not affecting any current behavior, so maybe no update is required?

  • [ ] doc

benjamin99 avatar Feb 28 '23 01:02 benjamin99

@benjamin99:Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

github-actions[bot] avatar Feb 28 '23 01:02 github-actions[bot]

@benjamin99:Thanks for providing doc info!

github-actions[bot] avatar Feb 28 '23 02:02 github-actions[bot]

@zymap Could you review this PR?

nodece avatar Mar 08 '23 02:03 nodece