com.alibaba.rocketmq.common.protocol.body.GroupList Java Examples

The following examples show how to use com.alibaba.rocketmq.common.protocol.body.GroupList. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConsumerServiceImpl.java    From rocket-console with Apache License 2.0 5 votes vote down vote up
@Override
@MultiMQAdminCmdMethod
public Map<String /*groupName*/, TopicConsumerInfo> queryConsumeStatsListByTopicName(String topic) {
    Map<String, TopicConsumerInfo> group2ConsumerInfoMap = Maps.newHashMap();
    try {
        GroupList groupList = mqAdminExt.queryTopicConsumeByWho(topic);
        for (String group : groupList.getGroupList()) {
            List<TopicConsumerInfo> topicConsumerInfoList = queryConsumeStatsList(topic, group);
            group2ConsumerInfoMap.put(group, CollectionUtils.isEmpty(topicConsumerInfoList) ? new TopicConsumerInfo(topic) : topicConsumerInfoList.get(0));
        }
        return group2ConsumerInfoMap;
    } catch (Exception e) {
        throw propagate(e);
    }
}
 
Example #2
Source File: TopicServiceImpl.java    From rocket-console with Apache License 2.0 5 votes vote down vote up
@Override
public GroupList queryTopicConsumerInfo(String topic) {
    try {
        return mqAdminExt.queryTopicConsumeByWho(topic);
    } catch (Exception e) {
        throw Throwables.propagate(e);
    }
}
 
Example #3
Source File: MQAdminExtImpl.java    From rocket-console with Apache License 2.0 4 votes vote down vote up
@Override
public GroupList queryTopicConsumeByWho(String topic)
        throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException,
        InterruptedException, MQBrokerException, RemotingException, MQClientException {
    return MQAdminInstance.threadLocalMQAdminExt().queryTopicConsumeByWho(topic);
}
 
Example #4
Source File: TopicService.java    From rocket-console with Apache License 2.0 votes vote down vote up
GroupList queryTopicConsumerInfo(String topic);