11 lines
511 B
Plaintext
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 |