[ https://issues.apache.org/jira/browse/ROCKETMQ-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080074#comment-16080074 ]
ASF GitHub Bot commented on ROCKETMQ-243: ----------------------------------------- Github user Jaskey commented on the issue: https://github.com/apache/incubator-rocketmq/pull/130 Broker contention should be safe but random pick can balance the network call for to all masters. but we have to be cautions about this since for the current implementations, the broker addr will be very stable since it always return the same broker addr to the caller. There are more than ten caller methods on this `selectBrokerAddr`, we have to make sure the random pick will not cause any side effect. I believe it has not @lizhanhui @vongosling @zhouxinyu what's your opions. @shroman , and since this method only returns the master addrs, I will suggest rename it to `pickMasterAddr`. Since the method is only called by some inner impl caller, I think it is safe to rename. > BrokerData#selectBrokerAddr() picks the 1st element in the list of addresses > ---------------------------------------------------------------------------- > > Key: ROCKETMQ-243 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-243 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-commons > Affects Versions: 4.1.0-incubating > Reporter: Roman Shtykh > Assignee: Roman Shtykh > Priority: Minor > > I wonder if this can cause broker contention. Therefore I propose to pick the > address at least in a random manner. -- This message was sent by Atlassian JIRA (v6.4.14#64029)