瀏覽代碼

Merge latest changes from 'labs'.

Grega Bremec 7 月之前
父節點
當前提交
c398b24085
共有 3 個文件被更改,包括 22 次插入3 次删除
  1. 3 3
      code/lab/README.adoc
  2. 8 0
      code/lab/connect.properties
  3. 11 0
      code/lab/postgres-source-connector.properties

+ 3 - 3
code/lab/README.adoc

@@ -53,7 +53,7 @@ You can also use all, or some, of them in a comma-separated list:
 You can create, delete, and alter topics with the `kafka-topics.sh` command.
 
 Creating a topic:
-+
+
 [subs="+quotes"]
 ----
 $ *./kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 \*
@@ -62,7 +62,7 @@ $ *./kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 \*
 ----
 
 Displaying a topic's configuration:
-+
+
 [subs="+quotes"]
 ----
 $ *./kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 \*
@@ -83,7 +83,7 @@ ReplicationFactor: 3	Configs: min.insync.replicas=2
 ----
 
 Deleting a topic:
-+
+
 [subs="+quotes"]
 ----
 $ *./kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 \*

+ 8 - 0
code/lab/connect.properties

@@ -0,0 +1,8 @@
+bootstrap.servers=localhost:9092,localhost:9192,localhost:9292
+key.converter=org.apache.kafka.connect.json.JsonConverter
+value.converter=org.apache.kafka.connect.json.JsonConverter
+key.converter.schemas.enable=true
+value.converter.schemas.enable=true
+offset.storage.file.filename=./connect/offsets
+offset.flush.interval.ms=10000
+plugin.path=./connect/plugins

+ 11 - 0
code/lab/postgres-source-connector.properties

@@ -0,0 +1,11 @@
+name=source-postgresql
+connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
+tasks.max=1
+connection.url=jdbc:postgresql://localhost:5432/eventdata
+connection.user=foo
+connection.password=bar
+schema.pattern=public
+table.whitelist=users
+mode=incrementing
+incrementing.column.name=id
+topic.prefix=event-data-