0


kafka topic和topic权限操作

topic

  • 创建/opt/kafka/bin/kafka-topics.sh --create \ --zookeeper zookeeper.example.com \ --replication-factor 1\ --partitions 1\ --topic KafkaTopicName
  • 查询/opt/kafka/bin/kafka-topics.sh --list \ --zookeeper zookeeper.example.com:2181
  • 删除/opt/kafka/bin/kafka-topics.sh \ --delete \ --zookeeper zookeeper.example.com:2181 \ --topic KafkaTopicName

topic权限:

  • 增加/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
标签: kafka

本文转载自: https://blog.csdn.net/qq_17328759/article/details/129804571
版权归原作者 Qredsun 所有, 如有侵权,请联系我们删除。

“kafka topic和topic权限操作”的评论:

还没有评论