用confluent的包部署debezium

版权声明:转载请注明出处,谢谢 https://blog.csdn.net/sweatOtt/article/details/79101425

1.下载confluent 4.0包, 地址https://www.confluent.io/download/,解压放到/opt下;

2.下载0.7.1debezium, 地址https://repo1.maven.org/maven2/io/debezium/debezium-connector-mysql/0.7.1/debezium-connector-mysql-0.7.1-plugin.tar.gz, 解压到/opt/confluent-4.0.0/share/java, 解压后的包名为debezium-connector-mysql

3.创建/opt/confluent-4.0.0/config/connect-distributed.properties文件, 添加配置信息

bootstrap.servers=
group.id=
rest.port=
rest.advertised.host.name=
rest.host.name=0.0.0.0
key.converter=io.confluent.connect.avro.AvroConverter
key.converter.schema.registry.url=
value.converter=io.confluent.connect.avro.AvroConverter
value.converter.schema.registry.url=
internal.key.converter=org.apache.kafka.connect.json.JsonConverter
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
internal.key.converter.schemas.enable=false
internal.value.converter.schemas.enable=false
config.storage.topic=
offset.storage.topic=
status.storage.topic=

4.修改bin/connect-distributed脚本, 添加debezium-connector-mysqlfor library ...所在行,主要为了debezium能被加载, 如下

for library in "kafka" "confluent-common" "kafka-serde-tools" "monitoring-interceptors" "debezium-connector-mysql"; 
do
 ...

5.启动调用脚本 /opt/confluent-4.0.0/bin/connect-distributed /opt/confluent-4.0.0/config/connect-distributed.properties

6.debezium启动成功, 如果要对其进行监控, 可以利用jmx_exporter; 可以参考上一篇内容: http://blog.csdn.net/sweatott/article/details/79090175

7.调用rest接口管理任务;具体可以参考debeziumkafka connect文档;

展开阅读全文

没有更多推荐了,返回首页