Remove duplicate code in TopicPublishInfo
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.
IMO, It's a good idea, welcome your PR :-)
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!
@Oliverwqcwrw I would like to work on this in case it is not picked up yet.
I would like to work on this, Could you please assign it to me?
i see this hasn't been assigned yet, can I work on this?
@Oliverwqcwrw Kindly to ask if there is somebody working for this issue? lf not, I'm glad to undertake it.
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 :)
Is it possible for this issue to be closed in the near future? If not, I'll try to follow up on it.