From 8af40d65a8e4a00013c85d00ad2aaa48555533b6 Mon Sep 17 00:00:00 2001 From: niebayes Date: Sun, 15 Mar 2026 09:02:57 +0000 Subject: [PATCH 1/2] update --- zh_CN/streaming/kafka.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/zh_CN/streaming/kafka.md b/zh_CN/streaming/kafka.md index 4a4a111..5573644 100644 --- a/zh_CN/streaming/kafka.md +++ b/zh_CN/streaming/kafka.md @@ -21,9 +21,20 @@ Kafka connector 用于将 Kafka topic 中的消息持续读入 Datalayers source | `brokers` | STRING | 无 | Yes | Kafka broker 列表,逗号分隔,格式为 `host:port` | | `topic` | STRING | 无 | Yes | 要消费的 topic | | `offset` | STRING | `latest` | No | 起始消费位置,支持 `earliest`、`latest`、`at()` | -| `group_id` | STRING | 无 | No | 消费组 ID | -| `username` | STRING | 无 | No | SASL 用户名 | -| `password` | STRING | 无 | No | SASL 密码 | +| `group_id` | STRING | 无 | No | 消费组 ID,用于基于已提交 offset 的启动和消费进度跟踪 | +| `auth_type` | STRING | `none` | No | 鉴权类型,支持 `none`、`sasl` | +| `protocol` | STRING | `sasl_plaintext` | No | SASL 协议。仅在 `auth_type='sasl'` 时生效;当前仅支持 `sasl_plaintext` | +| `mechanism` | STRING | `plain` | No | SASL 机制。仅在 `auth_type='sasl'` 时生效;支持 `plain`、`scram_sha_256`、`scram_sha_512` | +| `username` | STRING | 无 | No | SASL 用户名。仅在 `auth_type='sasl'` 时必填 | +| `password` | STRING | 无 | No | SASL 密码。仅在 `auth_type='sasl'` 时必填 | + +## 配置约束 + +- `auth_type='none'`:表示不使用鉴权。此时不能设置 `protocol`、`mechanism`、`username`、`password`。 +- `auth_type='sasl'`:表示使用 SASL 鉴权。此时必须同时设置 `username` 和 `password`。 +- `auth_type='sasl'` 时,`protocol` 和 `mechanism` 可省略,分别默认取 `sasl_plaintext` 和 `plain`。 +- 当前 `protocol` 仅支持 `sasl_plaintext`。`sasl_ssl` 还未支持,配置后会报错。 +- `offset='at()'` 中的 `` 必须是整数时间戳。 Format 相关配置请参考 [Formats](./format.md)。 From 9f44ce3fa0b71e8f93da9c65b535cb04bbc06b60 Mon Sep 17 00:00:00 2001 From: niebayes Date: Sun, 15 Mar 2026 09:50:12 +0000 Subject: [PATCH 2/2] update --- zh_CN/streaming/kafka.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zh_CN/streaming/kafka.md b/zh_CN/streaming/kafka.md index 5573644..af424f5 100644 --- a/zh_CN/streaming/kafka.md +++ b/zh_CN/streaming/kafka.md @@ -24,7 +24,7 @@ Kafka connector 用于将 Kafka topic 中的消息持续读入 Datalayers source | `group_id` | STRING | 无 | No | 消费组 ID,用于基于已提交 offset 的启动和消费进度跟踪 | | `auth_type` | STRING | `none` | No | 鉴权类型,支持 `none`、`sasl` | | `protocol` | STRING | `sasl_plaintext` | No | SASL 协议。仅在 `auth_type='sasl'` 时生效;当前仅支持 `sasl_plaintext` | -| `mechanism` | STRING | `plain` | No | SASL 机制。仅在 `auth_type='sasl'` 时生效;支持 `plain`、`scram_sha_256`、`scram_sha_512` | +| `mechanism` | STRING | `PLAIN` | No | SASL 机制。仅在 `auth_type='sasl'` 时生效;支持 `PLAIN`、`SCRAM-SHA-256`、`SCRAM-SHA-512` | | `username` | STRING | 无 | No | SASL 用户名。仅在 `auth_type='sasl'` 时必填 | | `password` | STRING | 无 | No | SASL 密码。仅在 `auth_type='sasl'` 时必填 | @@ -32,7 +32,7 @@ Kafka connector 用于将 Kafka topic 中的消息持续读入 Datalayers source - `auth_type='none'`:表示不使用鉴权。此时不能设置 `protocol`、`mechanism`、`username`、`password`。 - `auth_type='sasl'`:表示使用 SASL 鉴权。此时必须同时设置 `username` 和 `password`。 -- `auth_type='sasl'` 时,`protocol` 和 `mechanism` 可省略,分别默认取 `sasl_plaintext` 和 `plain`。 +- `auth_type='sasl'` 时,`protocol` 和 `mechanism` 可省略,分别默认取 `sasl_plaintext` 和 `PLAIN`。 - 当前 `protocol` 仅支持 `sasl_plaintext`。`sasl_ssl` 还未支持,配置后会报错。 - `offset='at()'` 中的 `` 必须是整数时间戳。