开发者社区> 问答> 正文

zookeeper中没有cursor或很久才更新一次,必须配置canal.destinations参

canal 1.1.4 mysql 5.7.26 zookeeper 3.4.14 kafka 2.12-2.4.0

单点. 发现zookeeper没有cursor, 没存位点信息啊

[zk: localhost:2181(CONNECTED) 10] ls /otter/canal [cluster, destinations] [zk: localhost:2181(CONNECTED) 11] ls /otter/canal/cluster [172.16.23.8:11111] [zk: localhost:2181(CONNECTED) 12] ls /otter/canal/destinations [fanboshi] [zk: localhost:2181(CONNECTED) 13] ls /otter/canal/destinations/fanboshi [running, cluster, 1001] [zk: localhost:2181(CONNECTED) 14] ls /otter/canal/destinations/fanboshi/running [] [zk: localhost:2181(CONNECTED) 15] get /otter/canal/destinations/fanboshi/running {"active":true,"address":"172.16.2xx.8:11111"} cZxid = 0x10000053b ctime = Mon Mar 09 18:30:00 CST 2020 mZxid = 0x10000053b mtime = Mon Mar 09 18:30:00 CST 2020 pZxid = 0x10000053b cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x100719607a90008 dataLength = 45 numChildren = 0 [zk: localhost:2181(CONNECTED) 16] ls /otter/canal/destinations/fanboshi/cluster [172.16.23.8:11111] [zk: localhost:2181(CONNECTED) 17] ls /otter/canal/destinations/fanboshi/1001
[]

instance.properties

$cat fanboshi/instance.properties #################################################

mysql serverId , v1.0.26+ will autoGen

canal.instance.mysql.slaveId=0

enable gtid use true/false

canal.instance.gtidon=true

position info

canal.instance.master.address=ip:port canal.instance.master.journal.name= canal.instance.master.position= canal.instance.master.timestamp= canal.instance.master.gtid=c30c6a02-4e32-11ea-84ec-fa163edcd14e:1-2051921

rds oss binlog

canal.instance.rds.accesskey= canal.instance.rds.secretkey= canal.instance.rds.instanceId=

table meta tsdb info

canal.instance.tsdb.enable=false canal.instance.tsdb.url=jdbc:mysql://ip:port/canal_tsdb_fanboshi canal.instance.tsdb.dbUsername=canal canal.instance.tsdb.dbPassword=canal

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

username/password

canal.instance.dbUsername=canal_r canal.instance.dbPassword=superpassword canal.instance.connectionCharset = UTF-8

enable druid Decrypt database password

canal.instance.enableDruid=false #canal.instance.pwdPublicKey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALK4BUxdDltRRE5/zXpVEVPUgunvscYFtEip3pmLlhrWpacX7y7GCMo2/JM6LeHmiiNdH1FWgGCpUfircSwlWKUCAwEAAQ==

table regex

canal.instance.filter.regex=fanboshi\..,sysbench\..

table black regex

canal.instance.filter.black.regex=.\.\_.\ghc,.*\.\.\_gho,.\.\_.*\_del

table field filter(format: schema1.tableName1:field1/field2,schema2.tableName2:field1/field2)

#canal.instance.filter.field=test1.t_product:id/subject/keywords,test2.t_company:id/name/contact/ch

table field black filter(format: schema1.tableName1:field1/field2,schema2.tableName2:field1/field2)

#canal.instance.filter.black.field=test1.t_product:subject/product_image,test2.t_company:id/name/contact/ch

mq config

canal.mq.topic=default_topic

dynamic topic route by schema or table regex

#canal.mq.dynamicTopic=mytest1.user,mytest2\..,.\..* canal.mq.dynamicTopic=.\.. #canal.mq.partition=0

hash partition config

#canal.mq.partitionsNum=3 #canal.mq.partitionHash=test.table:id^name,.\.. #################################################

原提问者GitHub用户Fanduzi

展开
收起
Java工程师 2023-05-03 11:02:13 125 0
1 条回答
写回答
取消 提交回答
  • 主要是因为空事务发送时只发送了begin,没有配套带上begin/commit事件,导致在gtid模式下位点更新时一直看不到commit事件

    原回答者GitHub用户agapple

    2023-05-04 15:09:14
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《MSE 微服务网关》 立即下载
微服务引擎 MSE 治理中心重磅发布 立即下载
阿里云微服务引擎 MSE 2.0 线上发布 立即下载