How to synchronize data from TiDB CDC to Kafka by only listening to delete events?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiDB CDC同步数据到Kafka,只需要监听delete事件,请问怎么实现呢?

| username: 泰迪比爱好者

We need to synchronize some TiDB data to ES and are considering using Logstash, but it cannot synchronize physically deleted data. Therefore, we are considering using TiCDC to monitor delete events. According to the official documentation, I filtered out insert and update events, but found it ineffective. The command to start the synchronization task is as follows:

The configuration file is as follows:
image

However, it was found to be ineffective in practice.

| username: tidb菜鸟一只 | Original post link

Are you looking to block delete or keep delete? To block delete, use ignore-event=[“delete”].

| username: 泰迪比爱好者 | Original post link

I only need delete, not concerned with update and insert.

| username: cassblanca | Original post link

The Canal-JSON protocol was originally designed for MySQL and does not include important fields such as TiDB’s unique CommitTS transaction identifier. To address this issue, TiCDC adds TiDB extension fields to the Canal-JSON protocol format. Set enable-tidb-extension to true in the sink-uri.
TiCDC Canal-JSON Protocol | PingCAP Documentation Center

| username: 泰迪比爱好者 | Original post link

Your answer is irrelevant to the question, isn’t it?

| username: tidb菜鸟一只 | Original post link

Then it should be like this. It is written this way, but no data is generated?

| username: 泰迪比爱好者 | Original post link

It just didn’t take effect. In addition to delete events, there are also insert and update events.

| username: tidb菜鸟一只 | Original post link

matcher = [“ctest1.*”]
Didn’t write matcher? This should be written on the line above ignore-event.

| username: 泰迪比爱好者 | Original post link

Got it, thanks.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.