kafka basic
kafka 安装
1 | curl -O https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.5.5/apache-zookeeper-3.5.5-bin.tar.gz |
https://www.explainshell.com/
man
tldr
tar -xzf FILENAME -C FOLDER –strip-components=1
1 | curl -O http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/2.3.0/kafka_2.12-2.3.0.tgz |
1 | [repositories] |
```
bin/kafka-topics.sh –create –zookeeper localhost:2181 –replication-factor 1 –partitions 1 –topic test
bin/kafka-topics.sh –list –zookeeper localhost:2181
bin/kafka-console-producer.sh –broker-list localhost:9092 –topic test
bin/kafka-console-consumer.sh –bootstrap-server localhost:9092 –topic test –from-beginning
bin/kafka-topics.sh –create –zookeeper localhost:2181/test –replication-factor 3 –partitions 1 –topic my-replicated-topic
bin/kafka-topics.sh –describe –zookeeper localhost:2181/test –topic my-replicated-topic
bin/kafka-console-producer.sh –broker-list localhost:9092 –topic my-replicated-topic
bin/kafka-console-consumer.sh –bootstrap-server localhost:9092 –from-beginning –topic my-replicated-topic
ps aux | grep -E /server.*.properties