You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
511 B

# 创建topic
/usr/local/kafka/bin/kafka-topics.sh --create --topic writeAsync --partitions 1 --replication-factor 1 --bootstrap-server localhost:9092
# 删除topic
/usr/local/kafka/bin/kafka-topics.sh --delete --topic writeAsync --bootstrap-server localhost:9092
# 发送
/usr/local/kafka/bin/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic writeAsync
# 接收
/usr/local/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic writeAsync --from-beginning