kafka conet

指令:
export JAVA_HOME=/usr/java/jdk1.8.0_172-amd64
export PATH=\(JAVA_HOME/bin:\)PATH
export CLASSPATH=.:\(JAVA_HOME/lib/*:\)JAVA_HOME/jre/lib/:/opt/java/lib/

bin/kafka-server-start.sh config/server.properties
/opt/kafka/bin/connect-standalone.sh /kafka/config/connect-standalone.properties /kafka/config/source-pg.properties

配置:
name=test-source-postgres-jdbc
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
connection.url=jdbc:postgresql://192.168.1.16/test?user=postgres&password=postgres
mode=incrementing
incrementing.column.name=id
topic.prefix=test-kafka-
table.whitelist=test

posted @ 2018-04-24 15:11  javaite  阅读(130)  评论(0编辑  收藏  举报