在jdbc连接器中使用递增摄取的问题

问题描述 投票:0回答:1

我正在尝试使用递增的摄取来生成有关更新mysql中的表的主题的消息。它使用时间戳工作,但似乎没有使用递增列模式。当我在表中插入一个新行时,我没有看到发布到该主题的任何消息。

{
            "_comment": " --- JDBC-specific configuration below here  --- ",
            "_comment": "JDBC connection URL. This will vary by RDBMS. Consult your manufacturer's handbook for more information",
            "connection.url": "jdbc:mysql://localhost:3306/lte?user=root&password=tiger",

            "_comment": "Which table(s) to include",
            "table.whitelist": "candidate_score",

            "_comment": "Pull all rows based on an timestamp column. You can also do bulk or incrementing column-based extracts. For more information, see http://docs.confluent.io/current/connect/connect-jdbc/docs/source_config_options.html#mode",
            "mode": "incrementing",

            "_comment": "Which column has the timestamp value to use?  ",
            "incrementing.column.name": "attempt_id",

            "_comment": "If the column is not defined as NOT NULL, tell the connector to ignore this  ",
            "validate.non.null": "true",

            "_comment": "The Kafka topic will be made up of this prefix, plus the table name  ",
            "topic.prefix": "mysql-"
    }

attempt_id是一个自动递增非空列,也是主键。

mysql jdbc apache-kafka apache-kafka-connect confluent
1个回答
0
投票

实际上,这是我的错。我正在听错话题。

© www.soinside.com 2019 - 2024. All rights reserved.