启动kafka 自带zookeeoercd 2181
sh zookeeper-server-start.sh ../config/zookeeper.properties
启动kafka 9092
sh kafka-server-start.sh ../config/server.properties
//后台启动
nohup bin/kafka-server-start.sh config/server.properties >/dev/null 2>&1 &
启动 cannal
sh startup.sh
查看topic
sh kafka-topics.sh --list --zookeeper localhost:2181
查看 消息
sh kafka-console-consumer.sh --bootstrap-server 127.0.0.1:9092 --topic canaltopic
查看所有消息
sh kafka-console-consumer.sh --bootstrap-server 127.0.0.1:9092 --from-beginning --topic canaltopic
网友评论