Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix kafka sink docs #3538

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
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
38 changes: 19 additions & 19 deletions docs/en_US/guide/sinks/plugin/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,25 @@ Restart the eKuiper server to activate the plugin.

## Properties

| Property name | Optional | Description |
|--------------------|----------|---------------------------------------------------|
| brokers | false | The broker address list ,split with "," |
| topic | false | The topic of the Kafka |
| saslAuthType | false | The Kafka sasl authType, support none,plain,scram |
| saslUserName | true | The sasl user name |
| saslPassword | true | The sasl password |
| insecureSkipVerify | true | whether to ignore SSL verification |
| certificationPath | true | Kafka client ssl verification Cert file path |
| privateKeyPath | true | Key file path for Kafka client SSL verification |
| rootCaPath | true | Kafka client ssl verified CA certificate file path |
| certficationRaw | true | Kafka client ssl verified Cert base64 encoded original text, use `certificationPath` first if both defined |
| privateKeyRaw | true | Kafka client ssl verified Key base64 encoded original text, use `privateKeyPath` first if both defined |
| rootCARaw | true | Kafka client ssl verified CA base64 encoded original text, use `rootCaPath` first if both defined |
| maxAttempts | true | The number of retries the Kafka client sends messages to the server, the default is 1 |
| requiredACKs | true | The mechanism for Kafka client to confirm messages, -1 means waiting for leader confirmation, 1 means waiting for confirmation from all replicas, 0 means not waiting for confirmation, default -1 |
| key | true | Key information carried by the Kafka client in messages sent to the server |
| headers | true | The header information carried by the Kafka client in the message sent to the server |
| compression | true | Whether to enable compression when the Kafka client sends messages to the server, only supports `gzip`, `snappy`, `lz4`, `zstd` |
| Property name | Optional | Description |
|--------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| brokers | false | The broker address list ,split with "," |
| topic | false | The topic of the Kafka |
| saslAuthType | false | The Kafka sasl authType, support none,plain,scram |
| saslUserName | true | The sasl user name |
| saslPassword | true | The sasl password |
| insecureSkipVerify | true | whether to ignore SSL verification |
| certificationPath | true | Kafka client ssl verification Cert file path |
| privateKeyPath | true | Key file path for Kafka client SSL verification |
| rootCaPath | true | Kafka client ssl verified CA certificate file path |
| certficationRaw | true | Kafka client ssl verified Cert base64 encoded original text, use `certificationPath` first if both defined |
| privateKeyRaw | true | Kafka client ssl verified Key base64 encoded original text, use `privateKeyPath` first if both defined |
| rootCARaw | true | Kafka client ssl verified CA base64 encoded original text, use `rootCaPath` first if both defined |
| maxAttempts | true | The number of retries the Kafka client sends messages to the server, the default is 1 |
| requiredACKs | true | The mechanism for Kafka client to confirm messages, 1 means waiting for leader confirmation, -1 means waiting for confirmation from all replicas, 0 means not waiting for confirmation, default 1 |
| key | true | Key information carried by the Kafka client in messages sent to the server |
| headers | true | The header information carried by the Kafka client in the message sent to the server |
| compression | true | Whether to enable compression when the Kafka client sends messages to the server, only supports `gzip`, `snappy`, `lz4`, `zstd` |

You can check the connectivity of the corresponding sink endpoint in advance through the API: [Connectivity Check](../../../api/restapi/connection.md#connectivity-check)

Expand Down
36 changes: 18 additions & 18 deletions docs/zh_CN/guide/sinks/plugin/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,25 @@ $(PLUGINS_CUSTOM):

## 属性

| 属性名称 | 是否可选 | 说明 |
|--------------------|------|--------------------------------|
| brokers | 否 | broker地址列表 ,用 "," 分割 |
| topic | 否 | kafka 主题 |
| saslAuthType | 否 | sasl 认证类型 , 支持none,plain,scram |
| saslUserName | 是 | sasl 用户名 |
| saslPassword | 是 | sasl 密码 |
| insecureSkipVerify | 是 | 是否忽略 SSL 验证 |
| certificationPath | 是 | Kafka 客户端 ssl 验证的 crt 文件路径 |
| privateKeyPath | 是 | Kafka 客户端 ssl 验证的 key 文件路径 |
| rootCaPath | 是 | Kafka 客户端 ssl 验证的 ca 证书文件路径 |
| certficationRaw | 是 | Kafka 客户端 ssl 验证,经过 base64 编码过的的 crt 原文, 如果同时定义了 `certificationPath` 将会先用该参数。 |
| privateKeyRaw | 是 | Kafka 客户端 ssl 验证,经过 base64 编码过的的 key 原文, 如果同时定义了 `privateKeyPath` 将会先用该参数。 |
| 属性名称 | 是否可选 | 说明 |
|--------------------|------|-------------------------------------------------------------------------------|
| brokers | 否 | broker地址列表 ,用 "," 分割 |
| topic | 否 | kafka 主题 |
| saslAuthType | 否 | sasl 认证类型 , 支持none,plain,scram |
| saslUserName | 是 | sasl 用户名 |
| saslPassword | 是 | sasl 密码 |
| insecureSkipVerify | 是 | 是否忽略 SSL 验证 |
| certificationPath | 是 | Kafka 客户端 ssl 验证的 crt 文件路径 |
| privateKeyPath | 是 | Kafka 客户端 ssl 验证的 key 文件路径 |
| rootCaPath | 是 | Kafka 客户端 ssl 验证的 ca 证书文件路径 |
| certficationRaw | 是 | Kafka 客户端 ssl 验证,经过 base64 编码过的的 crt 原文, 如果同时定义了 `certificationPath` 将会先用该参数。 |
| privateKeyRaw | 是 | Kafka 客户端 ssl 验证,经过 base64 编码过的的 key 原文, 如果同时定义了 `privateKeyPath` 将会先用该参数。 |
| rootCARaw | 是 | Kafka 客户端 ssl 验证,经过 base64 编码过的的 ca 原文, 如果同时定义了 `rootCAPath` 将会先用该参数。 |
| maxAttempts | 是 | Kafka 客户端向 server 发送消息的重试次数,默认为1 |
| requiredACKs | 是 | Kafka 客户端确认消息的机制,-1 代表等待 leader 确认,1 代表等待所有副本确认, 0 代表不等待确认, 默认为 -1|
| key | 是 | Kafka 客户端向 server 发送消息所携带的 Key 信息 |
| headers | 是 | Kafka 客户端向 server 发送消息所携带的 headers 信息 |
| compression | 是 | Kafka 客户端向 server 发送消息时是否开启压缩,仅支持 `gzip`,`snappy`,`lz4`,`zstd` |
| maxAttempts | 是 | Kafka 客户端向 server 发送消息的重试次数,默认为1 |
| requiredACKs | 是 | Kafka 客户端确认消息的机制,1 代表等待 leader 确认,-1 代表等待所有副本确认, 0 代表不等待确认, 默认为 1 |
| key | 是 | Kafka 客户端向 server 发送消息所携带的 Key 信息 |
| headers | 是 | Kafka 客户端向 server 发送消息所携带的 headers 信息 |
| compression | 是 | Kafka 客户端向 server 发送消息时是否开启压缩,仅支持 `gzip`,`snappy`,`lz4`,`zstd` |

其他通用的 sink 属性也支持,请参阅[公共属性](../overview.md#公共属性)。

Expand Down
2 changes: 1 addition & 1 deletion extensions/impl/kafka/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ var (

func getDefaultKafkaConf() *kafkaConf {
c := &kafkaConf{
RequiredACKs: -1,
RequiredACKs: 1,
MaxAttempts: 1,
}
c.kafkaWriterConf = kafkaWriterConf{
Expand Down
Loading