bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic test 支持正则表达式匹配Topic来进行删除,只需要将topic 用双引号包裹起来 例如: 删除以create_topic_byhand_zk为开头的topic; bin/kafka-top
sh bin/kafka-topics.sh --bootstrap-server xxxxxx:9092 --list --exclude-internal --topic "test_create_.*" 相关可选参数 参数 描述 例子 --exclude-internal 排除kafka内部topic,比如__consumer_offsets-* --exclude-internal --topic 可以正则表达式进行匹配,展示topic名称 --topic 2.ConfigCommand Confi...
查询test_create_开头的所有Topic列表sh bin/kafka-topics.sh --bootstrap-server xxxxxx:9092 --list --exclude-internal --topic "test_create_.*" 相关可选参数 2.ConfigCommand Config相关操作; 动态配置可以覆盖默认的静态配置; 2.1 查询配置 Topic配置查询 展示关于Topic的动静态配置 1.查询单个Topic配置(...
{"topic": "click", "partition": 0}, {"topic": "click", "partition": 1}, {"topic": "click", "partition": 2}, {"topic": "click", "partition": 3}, {"topic": "click", "partition": 4}, {"topic": "click", "partition": 5}, {"topic": "click", "partition": 6}, {"...
kafka内部所有的实现都是通过TopicCommand的main方法,通过java代码调用API,TopicCommand.main(options)的方式只能打印到控制台,不能转换到一个list。 下面讲解下如何转换为list: 1、查看主题(Topic) 【命令方式】:bin/kafka-topics.sh --list --zookeeper 192.168.2.212:2181/kafka ...
step4:删除某一topic # deleteall /brokers/topics/test02 ./kafka-consumer-groups.sh --bootstrap-server kafkadev:9091 --list --command-config ../config/producer.properties ./kafka-consumer-groups.sh --bootstrap-server 0.0.0.0:9092,0.0.0.0:9092,0.0.0.0:9092 --list --command-config ../conf...
1TopicCommand1.Topic创建bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 3 --partitions 3 --topic test
sh bin/kafka-topics.sh --bootstrap-server xxxxxx:9092 --list --exclude-internal --topic "test_create_.*" 相关可选参数 参数 描述 例子 --exclude-internal 排除kafka内部topic,比如__consumer_offsets-* --exclude-internal --topic 可以正则表达式进行匹配,展示topic名称 --topic 2.ConfigCommand Confi...
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list --command-config config/sasl.properties 生成repliac 的分配计划 预生成一个分配计划,不会执行,只是帮助生成一个计划 # topic-to-move.json { "topics": [{"topic": "topic_name"}, {"topic": "bss.auditlog.all"}], ...
11.TopicCommand 1.1.Topic创建 bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 3 --partitions 3 --topic test 相关可选参数 参数描述例子 --bootstrap-server 指定kafka服务 指定连接到的kafka服务; 如果有这个参数,则 --zookeeper可以不需要 --bootstrap-server localhos...