开发者社区> 问答> 正文

获取不到ROWDATA记录

canal server: 1.0.24

使用的是阿里云RDS,部署结构:

master --> slave --> canal server --> 消费程序

MySQL [zz]> show variables like '%binlog_format%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | binlog_format | ROW | +---------------+-------+ 1 row in set (0.00 sec)

消费程序日志基本都是这样的:

[2017-10-18 11:51:18,398] (CanalMessageHandlerONSImpl.java:35) DEBUG - handleMessage batchId[46] entrys[2] [2017-10-18 11:51:18,398] (CanalMessageHandlerONSImpl.java:42) DEBUG - entryType[TRANSACTIONBEGIN] schema[] tablename[] [2017-10-18 11:51:18,399] (CanalMessageHandlerONSImpl.java:42) DEBUG - entryType[TRANSACTIONEND] schema[] tablename[]

消费程序:

connector.connect(); connector.subscribe(null);

instance.properties

mysql serverId

canal.instance.mysql.slaveId = 42341

position info

canal.instance.master.address = xxxxx canal.instance.master.journal.name = canal.instance.master.position = canal.instance.master.timestamp =

#canal.instance.standby.address = #canal.instance.standby.journal.name = #canal.instance.standby.position = #canal.instance.standby.timestamp =

username/password

canal.instance.dbUsername = xx canal.instance.dbPassword = xx canal.instance.defaultDatabaseName = zz canal.instance.connectionCharset = UTF-8

table regex

canal.instance.filter.regex = .\.. #canal.instance.filter.regex = .order_info.

table black regex

canal.instance.filter.black.regex =

canal.properties

################################################# ######### common argument ############# ################################################# canal.id= 101 canal.ip= canal.port= 11111 canal.zkServers= 127.0.0.1:2181

flush data to zk

canal.zookeeper.flush.period = 1000

flush meta cursor/parse position to file

canal.file.data.dir = ${canal.conf.dir} canal.file.flush.period = 1000

memory store RingBuffer size, should be Math.pow(2,n)

canal.instance.memory.buffer.size = 16384

memory store RingBuffer used memory unit size , default 1kb

canal.instance.memory.buffer.memunit = 1024

meory store gets mode used MEMSIZE or ITEMSIZE

canal.instance.memory.batch.mode = MEMSIZE

detecing config

canal.instance.detecting.enable = false #canal.instance.detecting.sql = insert into retl.xdual values(1,now()) on duplicate key update x=now() canal.instance.detecting.sql = select 1 canal.instance.detecting.interval.time = 3 canal.instance.detecting.retry.threshold = 3 canal.instance.detecting.heartbeatHaEnable = false

support maximum transaction size, more than the size of the transaction will be cut into multiple transactions delivery

canal.instance.transaction.size = 1024

mysql fallback connected to new master should fallback times

canal.instance.fallbackIntervalInSeconds = 60

network config

canal.instance.network.receiveBufferSize = 16384 canal.instance.network.sendBufferSize = 16384 canal.instance.network.soTimeout = 30

binlog filter config

canal.instance.filter.query.dcl = false canal.instance.filter.query.dml = false canal.instance.filter.query.ddl = false canal.instance.filter.table.error = false canal.instance.filter.rows = false

binlog format/image check

canal.instance.binlog.format = ROW,STATEMENT,MIXED canal.instance.binlog.image = FULL,MINIMAL,NOBLOB

binlog ddl isolation

canal.instance.get.ddl.isolation = false

################################################# ######### destinations ############# ################################################# canal.destinations= zz

conf root dir

canal.conf.dir = ../conf

auto scan instance dir add/remove and start/stop instance

canal.auto.scan = true canal.auto.scan.interval = 5

canal.instance.global.mode = spring canal.instance.global.lazy = false #canal.instance.global.manager.address = 127.0.0.1:1099 #canal.instance.global.spring.xml = classpath:spring/memory-instance.xml #canal.instance.global.spring.xml = classpath:spring/file-instance.xml canal.instance.global.spring.xml = classpath:spring/default-instance.xml

原提问者GitHub用户airclear

展开
收起
绿子直子 2023-05-09 12:02:03 83 0
1 条回答
写回答
取消 提交回答
  • 关注是否有打开log slave参数

    原回答者GitHub用户agapple

    2023-05-10 11:07:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载