1. 啓動kafka
```
nohup ./bin/kafka-server-start.sh ./config/server.properties >> /opt/enclogs/kafka.log 2>&1 &
```
![image-20190925101435351](assets/image-20190925101435351.png)
創建Topic
```
kafka_2.11-1.1.1]# bin/kafka-topics.sh --create --zookeeper 127.0.0.1:2181 --replication-factor 1 --partitions 1 --topic gateway.invokeLog
bin/kafka-topics.sh --create --zookeeper 127.0.0.1:2181 --replication-factor 1 --partitions 1 --topic view.datadistribute
```
測試數據消費情況
```
kafka_2.11-1.1.1]# bin/kafka-console-producer.sh --broker-list xx.xx:9092 --topic gateway.invokeLog
kafka_2.11-1.1.1]# bin/kafka-console-consumer.sh --zookeeper 127.0.0.1:2181 --topic test --from-beginning