1Z1*_*Z10 7 apache-kafka kafkacat
我正在寻找一种使用kafkacat. 是否可能或唯一的方法是通过此处列出的脚本?
bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic mytopic
Run Code Online (Sandbox Code Playgroud)
根据man page和github源代码,kafkacat现阶段没有删除主题功能。所以唯一的方法是使用 kafka-topics 脚本。
kafkacat 是 Apache Kafka 0.8 的通用非 JVM 生产者和消费者,可以将其视为 Kafka 的 netcat。
Run Code Online (Sandbox Code Playgroud)In producer mode ( -P ), kafkacat reads messages from stdin, delimited with a configurable delimeter and produces them to the provided Kafka cluster, topic and partition. In consumer mode ( -C ), kafkacat reads messages from a topic and partition and prints them to stdout using the configured message delimiter. If neither -P or -C are specified kafkacat attempts to figure out the mode automatically based on stdin/stdout tty types. kafkacat also features a metadata list mode ( -L ), to display the current state of the Kafka cluster and its topics and partitions.
| 归档时间: |
|
| 查看次数: |
5265 次 |
| 最近记录: |