This is an automated email from the ASF dual-hosted git repository.

xiatian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 55dc10894 [ISSUE #204] Add Kafka connector docs (#205)
55dc10894 is described below

commit 55dc1089431f640dec334197ca09a428323e3e07
Author: Sh!yu <[email protected]>
AuthorDate: Tue Mar 12 18:15:32 2024 +0800

    [ISSUE #204] Add Kafka connector docs (#205)
    
    * add kafka connector doc
    
    * modify punctuation
---
 .../03-connect/10-file-connector.md                |  8 ++--
 .../03-connect/11-kafka-connector.md               | 56 ++++++++++++++++++++++
 .../03-connect/10-file-connector.md                |  6 +--
 .../03-connect/11-kafka-connector.md               | 56 ++++++++++++++++++++++
 4 files changed, 119 insertions(+), 7 deletions(-)

diff --git a/docs/design-document/03-connect/10-file-connector.md 
b/docs/design-document/03-connect/10-file-connector.md
index 0aeedd0f7..5924545b3 100644
--- a/docs/design-document/03-connect/10-file-connector.md
+++ b/docs/design-document/03-connect/10-file-connector.md
@@ -8,7 +8,7 @@
 4. Using the Topic specified in `pubSubConfig.subject`, send a message to 
EventMesh, which you will persist in the file.
 
 ```yaml
-# public config
+# Common configuration
 pubSubConfig:
     meshAddress: 127.0.0.1:10000
     subject: TopicTest
@@ -29,10 +29,10 @@ connectorConfig:
 1. Start your EventMesh Runtime.
 2. Enable sinkConnector and check `source-config.yml`.
 3. Started FileConnectServer,It sends the data read from 
`connectorConfig.filePath` to `pubSubConfig.subject` in the EventMesh Runtime.
-4. The append to the file content is recognized, and you receive the message 
in EventMesh
+4. The append to the file content is recognized, and you receive the message 
in EventMesh.
 
 ```yaml
-# public config
+# Common configuration
 pubSubConfig:
     meshAddress: 127.0.0.1:10000
     subject: TopicTest
@@ -48,4 +48,4 @@ connectorConfig:
     filePath: userFilePath
 ```
 
-> Special note: System.in and System.out are used if the source file or import 
file cannot be retrieved
\ No newline at end of file
+> Special note: System.in and System.out are used if the source file or import 
file cannot be retrieved.
\ No newline at end of file
diff --git a/docs/design-document/03-connect/11-kafka-connector.md 
b/docs/design-document/03-connect/11-kafka-connector.md
new file mode 100644
index 000000000..7ff65580b
--- /dev/null
+++ b/docs/design-document/03-connect/11-kafka-connector.md
@@ -0,0 +1,56 @@
+# Kafka
+
+## KafkaSinkConnector:From EventMesh to Kafka
+
+1. Start your EventMesh Runtime.
+2. Enable sinkConnector and check `sink-config.yml`.
+3. Start your KafkaConnectServer, which will subscribe to the topic defined in 
`pubSubConfig.subject` in the EventMesh Runtime, The received data is published 
to `connectorConfig.topic` in Kafka.
+4. Using the Topic specified in `pubSubConfig.subject`, send a message to 
EventMesh, which you will then see in Kafka.
+
+```yaml
+# Common configuration
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: kafkaSink
+  appId: 5031
+  userName: kafkaSinkUser
+  passWord: kafkaPassWord
+connectorConfig:
+  connectorName: kafkaSink
+  # kafka connection parameters ↓
+  bootstrapServers: 127.0.0.1:9092
+  topic: TopicTest
+  keyConverter: org.apache.kafka.common.serialization.StringSerializer
+  valueConverter: org.apache.kafka.common.serialization.StringSerializer
+```
+
+## KafkaSourceConnector:From Kafka to EventMesh
+
+1. Start your EventMesh Runtime.
+2. Enable sourceConnector and check `source-config.yml`.
+3. Start your KafkaConnectServer, which will subscribe to Kafka's 
`connectorConfig.topic` and send the read data to `pubSubConfig.subject` in the 
EventMesh Runtime.
+4. Send a message to Kafka, and you'll receive it in EventMesh.
+
+```yaml
+# Common configuration
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: kafkaSource
+  appId: 5032
+  userName: kafkaSourceUser
+  passWord: kafkaPassWord
+connectorConfig:
+  connectorName: kafkaSource
+  # kafka connection parameters ↓
+  bootstrapServers: 127.0.0.1:9092
+  topic: TopicTest
+  groupID: kafkaSource
+  sessionTimeoutMS: 10000
+  maxPollRecords: 1000
+```
\ No newline at end of file
diff --git 
a/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/10-file-connector.md
 
b/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/10-file-connector.md
index ecf03fb67..82e7c027a 100644
--- 
a/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/10-file-connector.md
+++ 
b/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/10-file-connector.md
@@ -4,7 +4,7 @@
 
 1. 启动你的 EventMesh Runtime。
 2. 启用 sinkConnector 并检查 `sink-config.yml`。
-3. 启动你的 FileConnectServer,它将订阅到 EventMesh Runtime 中 `pubSubConfig.subject` 
中定义的主题,并将数据写入到 路径位于: `connectorConfig.topic`/年/月/日  ;名为: 【 
`connectorConfig.topic` + 当前时间小时位(24小时制) + 时间戳 】的文件
+3. 启动你的 FileConnectServer,它将订阅到 EventMesh Runtime 中 `pubSubConfig.subject` 
中定义的主题,并将数据写入到 路径位于: `connectorConfig.topic`/年/月/日  ;名为: 【 
`connectorConfig.topic` + 当前时间小时位(24小时制) + 时间戳 】的文件。
 4. 使用在 `pubSubConfig.subject` 中指定的 Topic,向 EventMesh 发送消息,然后你将在 文件 中持久化该消息。
 
 ```yaml
@@ -29,7 +29,7 @@ connectorConfig:
 1. 启动你的 EventMesh Runtime。
 2. 启用 sourceConnector 并检查 `source-config.yml`。 
 3. 启动你的 FileConnectServer,它将从 `connectorConfig.filePath `中读取的数据发送到 EventMesh 
Runtime 中的 `pubSubConfig.subject`。 
-4. 文件内容的 追加操作 会被识别,然后你将在 EventMesh 中接收到该消息
+4. 文件内容的 追加操作 会被识别,然后你将在 EventMesh 中接收到该消息。
 
 ```yaml
 # 公共配置
@@ -48,4 +48,4 @@ connectorConfig:
     filePath: userFilePath
 ```
 
-> 特殊说明:如果没能获取源文件或汇入文件,则使用 System.in 和 System.out
\ No newline at end of file
+> 特殊说明:如果没能获取源文件或汇入文件,则使用 System.in 和 System.out。
\ No newline at end of file
diff --git 
a/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/11-kafka-connector.md
 
b/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/11-kafka-connector.md
new file mode 100644
index 000000000..dc5fb0240
--- /dev/null
+++ 
b/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/11-kafka-connector.md
@@ -0,0 +1,56 @@
+# Kafka
+
+## KafkaSinkConnector:从 EventMesh 到 Kafka
+
+1. 启动你的 EventMesh Runtime。
+2. 启用 sinkConnector 并检查 `sink-config.yml`。
+3. 启动你的 KafkaConnectServer,它将订阅到 EventMesh Runtime 中 `pubSubConfig.subject` 
中定义的主题,并将收到的数据发布到 Kafka 中的 `connectorConfig.topic`。
+4. 使用在 `pubSubConfig.subject` 中指定的 Topic,向 EventMesh 发送消息,然后你将在 Kafka 看到该消息。
+
+```yaml
+# 公共配置
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: kafkaSink
+  appId: 5031
+  userName: kafkaSinkUser
+  passWord: kafkaPassWord
+connectorConfig:
+  connectorName: kafkaSink
+  # kafka连接参数 ↓
+  bootstrapServers: 127.0.0.1:9092
+  topic: TopicTest
+  keyConverter: org.apache.kafka.common.serialization.StringSerializer
+  valueConverter: org.apache.kafka.common.serialization.StringSerializer
+```
+
+## KafkaSourceConnector:从 Kafka 到 EventMesh
+
+1. 启动你的 EventMesh Runtime。
+2. 启用 sourceConnector 并检查 `source-config.yml`。 
+3. 启动你的 KafkaConnectServer,它将订阅 Kafka的 `connectorConfig.topic `,并将读取的数据发送到 
EventMesh Runtime 中的 `pubSubConfig.subject`。 
+4. 向 Kafka 发送一个消息,然后你将在 EventMesh 中接收到该消息。
+
+```yaml
+# 公共配置
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: kafkaSource
+  appId: 5032
+  userName: kafkaSourceUser
+  passWord: kafkaPassWord
+connectorConfig:
+  connectorName: kafkaSource
+  # kafka连接参数 ↓
+  bootstrapServers: 127.0.0.1:9092
+  topic: TopicTest
+  groupID: kafkaSource
+  sessionTimeoutMS: 10000
+  maxPollRecords: 1000
+```
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to