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的消费者端就能看到数据库变更信息

猜你喜欢

转载自blog.csdn.net/w786572258/article/details/83746568