我有一个正在运行的debezium设置,用于从MySQL执行CDC。现在,我想为另一个MySQL服务器创建一个MySQL连接器。但是我不希望为现有数据创建快照,而是要从特定文件和位置启动debezium新连接器。
connect-offsets
主题中。但是,如果我这样做,现有的设置会怎样? kafka-console-producer --broker-list localhost:9092 --topic connect-offsets
>{"file":"mysql-bin.000002","pos":2012}
>[2019-12-30 05:43:52,666] WARN [Producer clientId=console-producer] Got error produce response with correlation id 4 on topic-partition connect-offsets-5. Error: CORRUPT_MESSAGE (org.apache.kafka.clients.producer.internals.Sender)
[2019-12-30 05:43:52,767] WARN [Producer clientId=console-producer] Got error produce response with correlation id 5 on topic-partition connect-offsets-5, Error: CORRUPT_MESSAGE (org.apache.kafka.clients.producer.internals.Sender)
[2019-12-30 05:43:52,870] WARN [Producer clientId=console-producer] Got error produce response with correlation id 6 on topic-partition connect-offsets-5, Error: CORRUPT_MESSAGE (org.apache.kafka.clients.producer.internals.Sender)
[2019-12-30 05:43:52,975] ERROR Error when sending message to topic connect-offsets with key: null, value: 38 bytes with error: (org.apache.kafka.clients.ingCallback)
org.apache.kafka.common.errors.CorruptRecordException: This message has failed its CRC checksum, exceeds the valid size, has a null key for a compacted to.
我不确定该如何实现。有人可以帮我吗?
答案 0 :(得分:0)
Connect-offsets主题记录用于连接器偏移量管理,对于Debezium MySQL连接器,该主题中的记录具有包含在连接器配置下配置的连接器名称和MySQL服务器名称的键。
为此,如果您只想在该主题中生成记录,则也需要该密钥,然后Debezium连接器将能够读取这些偏移量。