@Override
public ProducerConnection examineProducerConnectionInfo(String producerGroup, final String topic)
throws RemotingException, MQClientException, InterruptedException, MQBrokerException {
TopicRouteData topicRouteData = this.examineTopicRouteInfo(topic);
ProducerConnection result = new ProducerConnection();
for (BrokerData bd : topicRouteData.getBrokerDatas()) {
String addr = bd.selectBrokerAddr();
if (addr != null) {
return this.mQClientFactory.getMQClientAPIImpl().getProducerConnectionList(addr,
producerGroup, 300);
}
}
if (result.getConnectionSet().isEmpty()) {
throw new MQClientException("Not found the consumer group connection", null);
}
return result;
}