in src/main/java/org/apache/rocketmq/exporter/task/MetricsCollectTask.java [695:709]
private static TwoTuple<String, String> buildClientAddresses(HashSet<Connection> connectionSet) {
if (connectionSet == null || connectionSet.isEmpty()) {
return new TwoTuple<>("", "");
}
List<String> clientAddresses = new ArrayList<>();
List<String> clientIdAddresses = new ArrayList<>();
for (Connection connection : connectionSet) {
clientAddresses.add(connection.getClientAddr());//tcp connect address
clientIdAddresses.add(connection.getClientId());//local ip
}
String str1 = String.join(",", clientAddresses);
String str2 = String.join(",", clientIdAddresses);
return new TwoTuple<>(str1, str2);
}