- 增加
/opt/kafka/bin/kafka-acls.sh \
--authorizer-properties zookeeper.connect=zookeeper.example.com:2181 \
--add \
--allow-principal User:"kafkaclient" \
--operation Read \
--topic KafkaTopicName
- 移除
/opt/kafka/bin/kafka-acls.sh \
--authorizer-properties zookeeper.connect=zookeeper.example.com:2181 \
--remove \
--allow-principal User:"kafkaclient" \
--operation Describe \
--topic KafkaTopicName \
--force
- 查询
/opt/kafka/bin/kafka-acls.sh \
--authorizer-properties zookeeper.connect=zookeeper.example.com:2181 \
--list \
--topic KafkaTopicName