canalDestinations: - canalDestination: example topic: example partition: # 不填分区,否则会报错,Invalid partition given with record # #对应topic分区数量 # partitionsNum: 3 # partitionHash: # #库名.表名: 唯一主键 # mytest.person: id
out: 2018-11-17 13:11:07,366 [myid:] - INFO [main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:2181
启动 canal,查看 canal.log 和 example.log 没报错即可
1 2 3 4
startup.bat
out: 2018-11-17 13:13:30.933 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just last position
canal 控制台输出:ERROR com.alibaba.otter.canal.server.CanalMQStarter - ack error , clientId:1001 batchId:3209 is not exist , please check
canal.log 输出:2018-11-17 12:39:59.317 [pool-4-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - ack error , clientId:1001 batchId:2882 is not exist , please check com.alibaba.otter.canal.server.exception.CanalServerException: ack error , clientId:1001 batchId:2882 is not exist , please check 2018-11-17 12:39:59.417 [pool-4-thread-1] ERROR com.alibaba.otter.canal.kafka.CanalKafkaProducer - Invalid partition given with record: 1 is not in the range [0...1). org.apache.kafka.common.KafkaException: Invalid partition given with record: 1 is not in the range [0...1).