Skip to content

Instantly share code, notes, and snippets.

@sohangp
Last active November 19, 2019 19:12
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 sohangp/51baf62543a25b0e9cc485d3ae1ed3ef to your computer and use it in GitHub Desktop.
Save sohangp/51baf62543a25b0e9cc485d3ae1ed3ef to your computer and use it in GitHub Desktop.
Student Connector
@Bean
public io.debezium.config.Configuration studentConnector() {
return io.debezium.config.Configuration.create()
.with("connector.class", "io.debezium.connector.postgresql.PostgresConnector")
.with("offset.storage", "org.apache.kafka.connect.storage.FileOffsetBackingStore")
.with("offset.storage.file.filename", "/path/cdc/offset/student-offset.dat")
.with("offset.flush.interval.ms", 60000)
.with("name", "student-postgres-connector")
.with("database.server.name", studentDBHost+"-"+studentDBName)
.with("database.hostname", studentDBHost)
.with("database.port", studentDBPort)
.with("database.user", studentDBUserName)
.with("database.password", studentDBPassword)
.with("database.dbname", studentDBName)
.with("table.whitelist", STUDENT_TABLE_NAME).build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment