maxwell + kafka的應用

kafka

開啓zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties
開啓kafka服務
bin/kafka-server-start.sh config/server.properties
創建topic(主題/隊列)
bin/kafka-console-producsh --broker-list localhost:9092 --topic maxwells
生產者推送消息
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic maxwells
消費者消費消息
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic maxwells–from-beginning

maxwell

bin/maxwell --u=‘root’ --password=‘root’ --host=‘localhost’ --producer=kafka --kafka.bootstrap.servers=localhost:9092 --kafka_topic=maxwells
配置後,在kafka的消費者端就能看到數據庫變更信息

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章