我正在尝试使用以下配置运行kafka jdbc源连接器:
{
"name": "source-mariadb-VIEW_GIORGOS",
"config": { "connector.class":"io.confluent.connect.jdbc.JdbcSourceConnector",
"tasks.max":"10",
"connection.url":"jdbc:mariadb://localhost:3306/kafka?user=myuser&password=mypass",
"table.whitelist":"VIEW_GIORGOS",
"mode":"timestamp",
"timestamp.column.name":"ROWVERSION",
"validate.non.null":"false",
"topic.prefix":"GIORGOS-",
"table.types":"TABLE,VIEW",
"poll.interval.ms":"1000",
"consumer.group.id":"mytopicgroup1"
}
}
但是kafka connect报告了以下错误:
WARN [Producer clientId=producer-8] Got error produce response with correlation id 1504 on topic-partition GIORGOS-VW_GIORGOS, retrying (2147483149 attempts left).
Error: CORRUPT_MESSAGE (org.apache.kafka.clients.producer.internals.Sender:526)
1条答案
按热度按时间pkln4tw61#
我发现这个错误与保留策略有关。
compact
策略需要一个键和一个值。由于视图没有键,因此消息已损坏。将策略更改为delete
为我解决了这个问题。