rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[ISSUE #3306] Implement SelectMessageQueueByMachineRoom

Open Git-Yang opened this issue 4 years ago • 2 comments

What is the purpose of the change

#3306

Brief changelog

  • Assign the expected message to be written to the computer room in consumeridcs, and confirm the machine room to which the Queue belongs based on the brokerName prefix.
  • If there is no Queue in the assign computer room, it will be written to other computer rooms by default.
  • In the queue of the assigned machine room, you can choose to use a random strategy or a hash strategy to select one of the queues

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • [x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • [x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • [x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Git-Yang avatar Aug 31 '21 03:08 Git-Yang

Coverage Status

Coverage increased (+0.02%) to 54.245% when pulling bf69b1a602262b681c1232d5e98d7d3cbbf4986b on Git-Yang:dev_selector into 2cac86626b12fd92e47e9fa12a25ca891214e82a on apache:develop.

coveralls avatar Aug 31 '21 22:08 coveralls

I am also implementimg this function these days. Maybe I can talk about my implement. I rewrite the "buildMQClientId" function. The clientId will start with machineroom tag like "${machineroom-{clientip}@{pid}}". Then the argument "arg" in select method is replaced with clientId. The preferred mqs is selected if the clientId has the same pre-value with brokername. haha. Maybe your implement is more compatibility.

jeffchanjunwei avatar Sep 01 '21 06:09 jeffchanjunwei

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 Jul 19 '23 00:07 github-actions[bot]

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

github-actions[bot] avatar Jul 24 '23 00:07 github-actions[bot]