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的消費者端就能看到數據庫變更信息