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
文章来源地址https://www.toymoban.com/news/detail-528675.html
文章来源:https://www.toymoban.com/news/detail-528675.html
到了这里,关于kafka topic和topic权限操作的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!