bin/kafka-server-start.sh config/server.porperties 启动kafka
bin/kafka-topic.sh --zookeeper node2:2181,node3:2181,node4:2181 --create --replication-factor2 --partitions 3 --topic test 创建主题
bin/kafka-console-consumer.sh --zookeeper node2:2181,node3:2181,node4:2181 --form-beginning --topic test 创建消费者
bin/kafka-console-producer.sh --broker-list node2:9092,node3:9092,node4:9092 --topic test 创建生产者
flume 漏到kafka 修改配置文件 sink.type = org.apache.flume.sink.kafka.KafkaSink sink.k1.borkerList=node2:9092 ....
代码体验
java发送数据到flume
kafka生产 -> storm -> kafka消费