Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
4.1.0-incubating, 4.2.0, 4.3.0
-
None
-
None
-
All Environments
Description
Currently in rocketmq-remoting, there are some NameServer related member variable and member functions.
such as:
---------------------------------------------------------------------------------------------------------------
private final AtomicReference<List<String>> namesrvAddrList = new AtomicReference<>();
private final AtomicReference<String> namesrvAddrChoosed = new AtomicReference<>();
private final AtomicInteger namesrvIndex = new AtomicInteger(initValueIndex());
private final Lock lockNamesrvChannel = new ReentrantLock();
public void updateNameServerAddressList(final List<String> addrs);
public List<String> getNameServerAddressList();
------------------------------------------------------------------------------------------------------------------
As an underlying network communication module, rocketmq-remoting should not know the concept of "Name Server". The NameServer related code should better be refactored into common module.