canal1.1.1+rocketmq+zk搭建
2019-02-21 本文已影响67人
青城楼主
文档参考https://github.com/alibaba/canal/wiki/Canal-Kafka-RocketMQ-QuickStart
1,zkui可以直观的看到zk的集群的节点
2,canal 1.1.1配置mq,是在/canal/conf/下面的mq.yml下面配置的,并不是在canal.properties配置
3,mq集群
brokerClusterName=rocketmq-cluster
brokerName=broker-a
brokerId=0
brokerIP1=118.24.45.7
namesrvAddr=118.24.945.7:9876;45.490.245.225:9876
deleteWhen=04
fileReservedTime=48
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
注意brokerIP1=118.24.45.7
4.canal-console 启动
nohup java -jar mqconsole.jar --server.port=8080 --rocketmq.config.namesrvAddr=45.40.205.225:9876 &
相关jar 这里有https://www.jianshu.com/p/23e04d8178b8
5,客户端配置
public class AbstractRocektMQTest {
public static String topic = "mtopic";
public static String groupId = "TOOLS_CONSUMER";
public static String nameServers = "118.240.45.7:9076;45.400.245.225:9076";
}