Thanks Liam, I want to achive the following function using java code:
For each avro serialized record received: 1 deserialized the record automatically by referencing schema registry 2 change the record to a sql statement needed to be executed and execute it Seems the kafka jdbc sink connector (https://docs.confluent.io/current/connect/kafka-connect-jdbc/sink-connector/index.html) can achieve this function. But i have no idea how to write with java code. Is there any code example to achieve this? Thanks, Lei wangl...@geekplus.com.cn From: Liam Clarke-Hutchinson Date: 2020-05-09 16:30 To: users Subject: Re: Write to database directly by referencing schema registry, no jdbc sink connector Hi Lei, You could use the Kafka Avro consumer to deserialise records using the Schema Registry automatically. Then write to the DB as you see fit. Cheers, Liam Clarke-Hutchinson On Sat, 9 May 2020, 2:38 pm wangl...@geekplus.com.cn, < wangl...@geekplus.com.cn> wrote: > > Using debezium to parse binlog, using avro serialization and send to kafka. > > Need to consume the avro serialized binlog data and wirite to target > database > I want to use self-written java code instead of kafka jdbc sink > connector. > > How can i reference the schema registry, convert a kafka message to > corresponding table record and write to corresponding table? > Is there any example code to do this ? > > Thanks, > Lei > > > > wangl...@geekplus.com.cn > >