Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法过滤事务信息TRANSACTIONBEGIN #2710

Closed
DataDevs opened this issue Apr 29, 2020 · 1 comment
Closed

无法过滤事务信息TRANSACTIONBEGIN #2710

DataDevs opened this issue Apr 29, 2020 · 1 comment

Comments

@DataDevs
Copy link

canal1.1.3版本
canal.instance.filter.transaction.entry = true
canal.mq.flatMessage = false
canal.serverMode = kafka
无法过滤掉TRANSACTIONBEGIN TRANSACTIONEND信息

调试的时候记录了一些信息
在CanalMQStarter的start中 获取到的System.getProperty("canal.instance.filter.transaction.entry") 都是true
但是在MessageSerializer 中获取System.getProperty("canal.instance.filter.transaction.entry")却是false
在CanalMessageSerializer的serializer中的if (!CollectionUtils.isEmpty(data.getEntries()))代码块中filterTransactionEntry也是false
所以一直没有走到continue;这个段代码
20200427235127
20200427235000
20200427234946

@DataDevs
Copy link
Author

从CanalStater的start来看,是先实例化CanalKafkaProducer 再实例化CanalMQStarter
在CanalMQStarter的start中 才会
if (properties.isFilterTransactionEntry()) {
System.setProperty("canal.instance.filter.transaction.entry", "true");
}
而isFilterTransactionEntry一直为true,setFilterTransactionEntry没有被调用过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants