Skip to content

Commit 7c78bc0

Browse files
authored
Update README.md
1 parent d2f842e commit 7c78bc0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# kafkaConnect-jdbc-connector-sql
22
Connect 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.

0 commit comments

Comments
 (0)