This repository contains a Java App that uses Debezium Engine and YugabyteDB connector to stream change records from Yugabyte DB and print them.
Here are the steps to run this app
- Start YugabyteDB
./bin/yugabyted start --advertise_address <Your-IP> --ui false
- Create a table
CREATE TABLE test (id int primary key, name text);
- Create a stream ID using yb-admin
./yb-admin --master_addresses <Your-IP> create_change_data_stream ysql.<namespace>
- Compile the Java app
mvn clean package -Dquick
- Run the jar that has been created
java -jar target/dbz-embedded-yb-app.jar -master_addresses <Your-IP>:7100 -stream_id <Stream_ID> -table_include_list public.test
Note: Currently only three config properties (i.e. master_addresses, stream_id and table_include_list) are accepted via Command Line. If needed more configs can be added like this
- Now you can perform operations on your table in YugabyteDB and resulting change records will be printed by the app.