rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

add import/export command and test #6972

Open carlvine500 opened this issue 1 year ago • 1 comments

Which Issue(s) This PR Fixes

Fixes #6971 refer failed pull request #6972

Brief Description

  1. migrate message across env: we switch our system from aws to aliyun , some message still not consumed in aws , we should migrate message from aws to aliyun ==> just use exportMessage and importMessage .
  2. fix some wrong message: after deploy some bug , the message format is not correct ==> we can exportMessage with json body --> modify message body --> importMessasge
  3. trace bug in lots of message body ==> after export message with json/text format ,we could easily search some keywords to view message detail , such as grep keyword messageFile

How Did You Test This Change?

  1. exportMessage: mock broker , fetch some messages and export to file , at the same time , show result 100% on system.out
  2. importMessage: mock broker , read a message file and send message to broker , at the same time , show result 100% on system.out

example usage

WeChatc0e14e48d1e5c6ef1ee135a5141a74bf

carlvine500 avatar Sep 10 '24 10:09 carlvine500

Codecov Report

Attention: Patch coverage is 67.56757% with 96 lines in your changes missing coverage. Please review.

Project coverage is 47.52%. Comparing base (f43d9d1) to head (1ec33a6).

Files with missing lines Patch % Lines
...mq/tools/command/message/ExportMessageCommand.java 65.88% 37 Missing and 21 partials :warning:
...mq/tools/command/message/ImportMessageCommand.java 66.97% 20 Missing and 16 partials :warning:
.../apache/rocketmq/tools/command/MQAdminStartup.java 0.00% 2 Missing :warning:
Additional details and impacted files
@@              Coverage Diff               @@
##             develop    #8676       +/-   ##
==============================================
+ Coverage           0   47.52%   +47.52%     
- Complexity         0    11565    +11565     
==============================================
  Files              0     1279     +1279     
  Lines              0    89745    +89745     
  Branches           0    11550    +11550     
==============================================
+ Hits               0    42652    +42652     
- Misses             0    41845    +41845     
- Partials           0     5248     +5248     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 10 '24 14:09 codecov-commenter

This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.

github-actions[bot] avatar Sep 11 '25 00:09 github-actions[bot]

This PR was closed because it has been inactive for 3 days since being marked as stale.

github-actions[bot] avatar Sep 14 '25 00:09 github-actions[bot]