Skip to content

Instantly share code, notes, and snippets.

@alces
Created January 29, 2019 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alces/b02a354bb778c66171a82ae06b0ff899 to your computer and use it in GitHub Desktop.
Save alces/b02a354bb778c66171a82ae06b0ff899 to your computer and use it in GitHub Desktop.
Reset value of incrementing field for Kafka JDBC source connector
#!/bin/bash
echo '["my-connector-name",{"protocol":"1","table":"my_db_name.my_table_name"}]@{"incrementing":5}' | kafka-console-producer --topic _connect-offsets --broker-list 127.0.0.1:9092 --property parse.key=true --property key.separator=@
# And after issuing this command, restart the connector's task (pausing/resuming the connector isn't enoght)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment