You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Swapnapratim (via GitHub)" <gi...@apache.org> on 2023/03/29 04:36:43 UTC

[GitHub] [rocketmq] Swapnapratim opened a new pull request, #6499: ISSUE #6398

Swapnapratim opened a new pull request, #6499:
URL: https://github.com/apache/rocketmq/pull/6499

   To clarify, while there is indeed some duplicated code between the two selectOneMessageQueue methods, there are some differences as well, particularly in the handling of the lastBrokerName argument. Therefore, simply merging the two methods into one may not be the best solution in this case.
   
   However, there are still some opportunities to refactor the code to reduce duplication. One option could be to extract the common code into a private helper method, which both selectOneMessageQueue methods can call as needed.
   In this refactored version, the selectOneMessageQueue methods now simply call a private helper method, passing in null or the lastBrokerName argument as appropriate. The helper method contains the common code for selecting a message queue, including the loop, incrementing the queue index, and checking whether the broker name matches the given parameter.
   
   Note that in the refactored version, I also added a fallback option.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] drpmma commented on pull request #6499: ISSUE #6398

Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma commented on PR #6499:
URL: https://github.com/apache/rocketmq/pull/6499#issuecomment-1493848477

   Close for duplication.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] drpmma closed pull request #6499: ISSUE #6398

Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma closed pull request #6499: ISSUE #6398
URL: https://github.com/apache/rocketmq/pull/6499


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org