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

[GitHub] [rocketmq] zyx333 opened a new issue, #6398: Remove duplicate code in TopicPublishInfo

zyx333 opened a new issue, #6398:
URL: https://github.com/apache/rocketmq/issues/6398

   The code block below in the selectOneMessageQueue method is identical to another overloaded method (2nd code block).
   
   https://github.com/apache/rocketmq/blob/7d6748445617dea43bc8c2c0410292e2eb423dc1/client/src/main/java/org/apache/rocketmq/client/impl/producer/TopicPublishInfo.java#L74-L76
   
   https://github.com/apache/rocketmq/blob/7d6748445617dea43bc8c2c0410292e2eb423dc1/client/src/main/java/org/apache/rocketmq/client/impl/producer/TopicPublishInfo.java#L85-L90
   
   IMO, it can be rewritten like this.
   ```
   for (int i = 0; i < this.messageQueueList.size(); i++) {
            MessageQueue mq = selectOneMessageQueue()
            if (!mq.getBrokerName().equals(lastBrokerName)) {
                  return mq;
            }
    }
   ```
   
   If it's acceptable, I will submit a pull request.
   


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

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


Re: [I] Remove duplicate code in TopicPublishInfo [rocketmq]

Posted by "ThestralWarrior (via GitHub)" <gi...@apache.org>.
ThestralWarrior commented on issue #6398:
URL: https://github.com/apache/rocketmq/issues/6398#issuecomment-1851316276

   i see this hasn't been assigned yet, can I work on this?
   


-- 
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] Oliverwqcwrw commented on issue #6398: Remove duplicate code in TopicPublishInfo

Posted by "Oliverwqcwrw (via GitHub)" <gi...@apache.org>.
Oliverwqcwrw commented on issue #6398:
URL: https://github.com/apache/rocketmq/issues/6398#issuecomment-1475464451

   IMO, It's a good idea, welcome your PR :-)


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


Re: [I] Remove duplicate code in TopicPublishInfo [rocketmq]

Posted by "farukhfrk (via GitHub)" <gi...@apache.org>.
farukhfrk commented on issue #6398:
URL: https://github.com/apache/rocketmq/issues/6398#issuecomment-1764282108

   I would like to work on this, Could you please assign it to me?


-- 
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] AdityaP7649 commented on issue #6398: Remove duplicate code in TopicPublishInfo

Posted by "AdityaP7649 (via GitHub)" <gi...@apache.org>.
AdityaP7649 commented on issue #6398:
URL: https://github.com/apache/rocketmq/issues/6398#issuecomment-1737647109

   Hi there! I'm interested in working on this issue. It aligns with my skills. Could you please assign this issue to me, or guide me on how to get started? Thanks!
   


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


Re: [I] Remove duplicate code in TopicPublishInfo [rocketmq]

Posted by "benedikt-roth (via GitHub)" <gi...@apache.org>.
benedikt-roth commented on issue #6398:
URL: https://github.com/apache/rocketmq/issues/6398#issuecomment-1755941213

   @Oliverwqcwrw I would like to work on this in case it is not picked up yet.


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


Re: [I] Remove duplicate code in TopicPublishInfo [rocketmq]

Posted by "bitWizrd (via GitHub)" <gi...@apache.org>.
bitWizrd commented on issue #6398:
URL: https://github.com/apache/rocketmq/issues/6398#issuecomment-1879745870

   @Oliverwqcwrw   Kindly to ask if there is somebody working for this issue? lf not, I'm glad to undertake it.


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


Re: [I] Remove duplicate code in TopicPublishInfo [rocketmq]

Posted by "Oliverwqcwrw (via GitHub)" <gi...@apache.org>.
Oliverwqcwrw commented on issue #6398:
URL: https://github.com/apache/rocketmq/issues/6398#issuecomment-1880043659

   Thank you very much for your attention to the community, I noticed that the latest code has changed, please take a look at the latest code to check whether the problem still exists :)


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