rocketmq 之namesrv(三十一)mqclient admin请求处理从broker中获取系统topic列表

从broker中获取系统topic列表AdminBrokerProcessor#getSystemTopicListFromBroker

AdminBrokerProcessor#processRequest#this.getSystemTopicListFromBroker(ctx, request)

private RemotingCommand getSystemTopicListFromBroker(ChannelHandlerContext ctx, RemotingCommand request)
        throws RemotingCommandException {
        final RemotingCommand response = RemotingCommand.createResponseCommand(null);

        Set<String> topics = this.brokerController.getTopicConfigManager().getSystemTopic();
        TopicList topicList = new TopicList();
        topicList.setTopicList(topics);
        response.setBody(topicList.encode());
        response.setCode(ResponseCode.SUCCESS);
        response.setRemark(null);
        return response;
    }
TopicConfigManager#getSystemTopic
public Set<String> getSystemTopic() {
        return this.systemTopicList;
    }

private final Set<String> systemTopicList = new HashSet<String>();
发布了224 篇原创文章 · 获赞 67 · 访问量 28万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 技术黑板 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览