Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions zh_CN/streaming/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(<timestamp>)` |
| `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(<timestamp>)'` 中的 `<timestamp>` 必须是整数时间戳。

Format 相关配置请参考 [Formats](./format.md)。

Expand Down