File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 11# kafkaConnect-jdbc-connector-sql
22Connect SQL server using JDBC connector
3+
4+ #Connect Sql Server using kafka connect and jdbc connector
5+
6+ to run this example you need to have SQL server installed.
7+
8+
9+ and then follow the steps to start
10+
11+ 1 . start zookeeper server
12+
13+ kafka_2.12-2.2.1/bin/zookeeper-server-start.sh zookeeper.properties
14+
15+ 2 . then start kafka server
16+
17+ kafka_2.12-2.2.1/bin/kafka-server-start.sh server.properties
18+
19+ 3 . register the connector
20+
21+ kafka_2.12-2.2.1/bin/connect-standalone.sh connect-standalone.properties sql-server-jdbc-connector.properties
22+
23+ table.whitelist - specify tables you want to monitor
24+ mode - specifiy the mode incrementing, timestamp, both
25+ for more - https://docs.confluent.io/current/connect/kafka-connect-jdbc/source-connector/source_config_options.html#mode
26+
27+ 4 . check topic list
28+
29+ kafka_2.12-2.2.1/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list
30+
31+ and check wheather there are any topics starting from "incrementing-"
32+ * you can change the prefix by changing topic.prefix in connector properties
33+
34+ 5 . start console consumer and subscribe to a topic
35+
36+ kafka_2.12-2.2.1/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic incrementing-students
37+
38+ 6 . make changes (insert, update) and see those are reflected on consumer.
You can’t perform that action at this time.
0 commit comments