• 10 Debezium Oracle xstream


    本文目标

    部署debezium server 读取OracleXstream日志,发送到Kafka

    部署Oracle客户端

    下载客户端
    https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
    instantclient-basic-linux.x64-19.17.0.0.0dbru.zip
    instantclient-jdbc-linux.x64-19.17.0.0.0dbru.zip
    instantclient-sqlplus-linux.x64-19.17.0.0.0dbru.zip
    解压后得到instantclient_19_17目录

    配置server

    复制ojdbc8.jar 和 xstreams.jar 到dbz的lib目录
    修改run.sh增加
    export LD_LIBRARY_PATH=/home/yinyx/instantclient_19_17/
    配置conf/application.properties

    touch data/ora_offsets.dat
    
    [yinyx@hostyyx conf]$ cat application.properties
    quarkus.http.port=8999
    rkus.log.level=INFO
    quarkus.log.console.json=false
    
    debezium.source.connector.class=io.debezium.connector.oracle.OracleConnector
    debezium.source.offset.storage.file.filename=data/ora_offsets.dat
    debezium.source.offset.flush.interval.ms=0
    
    debezium.source.database.hostname=127.0.0.1
    debezium.source.database.port=1521
    debezium.source.database.user=c##xstrm
    debezium.source.database.password=xstrm
    debezium.source.database.dbname=ORCLCDB
    debezium.source.database.pdb.name=ORCLPDB1
    debezium.source.database.connection.adapter=xstream
    debezium.source.database.out.server.name=xstrmout
    #debezium.source.snapshot.mode=schema_only
    debezium.source.snapshot.mode=initial
    debezium.source.schema.include.list=YINYX
    debezium.source.table.include.list=YINYX.T1
    
    debezium.source.topic.prefix=yyx
    debezium.source.key.converter.schemas.enable=false
    debezium.source.value.converter.schemas.enable=false
    debezium.source.schema.history.internal.kafka.bootstrap.servers=127.0.0.1:9092
    debezium.source.schema.history.internal.kafka.topic=ora_schema_history
    
    debezium.source.decimal.handling.mode=string
    debezium.source.lob.enabled=true
    debezium.source.database.history.skip.unparseable.ddl=true
    debezium.source.tombstones.on.delete=false
    
    debezium.sink.type=kafka
    debezium.sink.kafka.producer.bootstrap.servers=127.0.0.1:9092
    debezium.sink.kafka.producer.key.serializer=org.apache.kafka.common.serialization.StringSerializer
    debezium.sink.kafka.producer.value.serializer=org.apache.kafka.common.serialization.StringSerializer
    
    debezium.format.key.schemas.enable=false
    debezium.format.value.schemas.enable=false
    
    [yinyx@hostyyx conf]$ 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
  • 相关阅读:
    FreeRTOS教程6 互斥量
    antd vue实现table的分页组件固定位置的效果
    【Linux篇<Day15>】——三分钟教会你如何搭建web网站
    《使用Gin框架构建分布式应用》阅读笔记:p52-p76
    JavaScript栈的实现与解题
    随机森林评价变量重要性可以无条件信任吗?
    ES6:const声明
    001 redis高并发减库存
    【小技巧】在matlab中如何精确统计一段程序的运行时间
    [附源码]计算机毕业设计JAVAjsp小微企业库存管理系统
  • 原文地址:https://blog.csdn.net/hryyx/article/details/128194883