Reset the JDBC Kafka Connector to start pulling rows from the beginning of time?

天大地大妈咪最大 提交于 2020-01-03 09:09:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!