全站最硬核 百万字强肝RocketMq源码 火热更新中~(六十)

@Override public ClusterAclVersionInfo examineBrokerClusterAclVersionInfo(
    String addr) throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
    return defaultMQAdminExtImpl.examineBrokerClusterAclVersionInfo(addr);
}

@Override public AclConfig examineBrokerClusterAclConfig(
    String addr) throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
    return defaultMQAdminExtImpl.examineBrokerClusterAclConfig(addr);
}

检查broker集群acl版本信息,检查broker集群acl配置

这里涉及到acl的概念

RocketMQ ACL使用指南

ACL是access control list的简称,俗称访问控制列表。访问控制,基本上会涉及到用户、资源、权限、角色等概念,那在RocketMQ中上述会对应哪些对象呢?

  • 用户
    用户是访问控制的基础要素,也不难理解,RocketMQ ACL必然也会引入用户的概念,即支持用户名、密码。
  • 资源
    资源,需要保护的对象,在RocketMQ中,消息发送涉及的Topic、消息消费涉及的消费组,应该进行保护,故可以抽象成资源。
  • 权限
    针对资源,能进行的操作,
  • 角色
    RocketMQ中,只定义两种角色:是否是管理员。

另外,RocketMQ还支持按照客户端IP进行白名单设置。

再回到代码

@Override
public void createAndUpdateSubscriptionGroupConfig(String addr,
    SubscriptionGroupConfig config) throws RemotingException,
    MQBrokerException, InterruptedException, MQClientException {
    defaultMQAdminExtImpl.createAndUpdateSubscriptionGroupConfig(addr, config);
}

@Override
public SubscriptionGroupConfig examineSubscriptionGroupConfig(String addr, String group)
    throws InterruptedException, RemotingException, MQClientException, MQBrokerException {
    return defaultMQAdminExtImpl.examineSubscriptionGroupConfig(addr, group);
}

@Override
public TopicConfig examineTopicConfig(String addr, String topic) throws RemotingException, InterruptedException, MQBrokerException {
    return defaultMQAdminExtImpl.examineTopicConfig(addr, topic);
}

@Override
public TopicStatsTable examineTopicStats(
    String topic) throws RemotingException, MQClientException, InterruptedException,
    MQBrokerException {
    return defaultMQAdminExtImpl.examineTopicStats(topic);
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值