public static List<String> getBrokers(RestTemplate restTemplate, PulsarClusterInfo clusterInfo)
            throws Exception {
        List<String> clusters = getClusters(restTemplate, clusterInfo);
        List<String> brokers = new ArrayList<>();
        for (String brokerName : clusters) {
            brokers.addAll(HttpUtils.request(restTemplate,
                    clusterInfo.getAdminUrls(QUERY_BROKERS_PATH + "/" + brokerName), HttpMethod.GET, null,
                    getHttpHeaders(clusterInfo.getToken()), ArrayList.class));
        }
        return brokers;
    }
Get the list of active brokers.

@param restTemplate spring framework RestTemplate
@param clusterInfo pulsar cluster info
@return list of pulsar broker infos
@throws Exception any exception if occurred
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/pulsar/PulsarUtils.java