Files
QingLong/Doc/方法与技巧/Kafka测试文档.txt
2025-08-15 09:13:13 +08:00

11 lines
511 B
Plaintext

# 创建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