问题
The Kafka Connector can make use of a primary key and a timestamp to determine which rows need to be processed.
I'm looking for a way to reset the Connector so that it will process from the beginning of time.
回答1:
Because the requirement is to run in distributed mode, the easiest thing to do is to update the connector name to a new value. This will prompt a new entry to be made into the connect-offsets topic as it looks like a totally new connector. Then the connector should start reading again as if nothing has been written to Kafka yet. You could also manually send a tombstone message to the key in the connect-offsets topic associated with that particular connector, but renaming is much easier than dealing with that. This method applies to all source connectors, not only the JDBC one described here.
来源:https://stackoverflow.com/questions/43004305/reset-the-jdbc-kafka-connector-to-start-pulling-rows-from-the-beginning-of-time