Your point is correct, thank you very much for your reply. I will create related issues to fix the documentation of the kafka-logger plugin.
在 2020-11-22 16:04:22,"Chao Zhang" <[email protected]> 写道: >Is the key related to encryptions? As far as I know, the Kafka Messages are >key/value pairs and keys are used for partition assignment. > >Chao Zhang >https://github.com/tokers > >On November 22, 2020 at 3:50:50 PM, Yuelin Zheng ([email protected]) wrote: > >The key field does not have a default value, because when the message is >sent to the Kafka service, the key can be specified as empty. > >在 2020-11-22 15:14:37,"Zhiyuan Ju" <[email protected]> 写道: >>then what's the default key for encrpting message? >> >>Yuelin Zheng <[email protected]> 于 2020年11月22日周日 下午1:39写道: >> >>> This key is the key used for Kafka to encrypt messages. >>> >>> >>> 在 2020-11-22 13:31:27,"Ming Wen" <[email protected]> 写道: >>> >What is the meaning of key here? >>> > >>> >Yuelin Zheng <[email protected]>于2020年11月22日 周日下午1:21写道: >>> > >>> >> Hi, Community, >>> >> >>> >> >>> >> In the schema of the kafka-logger plugin, the key field is mandatory, >as >>> >> shown below: >>> >> >>> >> >>> >> ``` >>> >> ...... >>> >> properties = { >>> >> ...... >>> >> key = {type = "string"}, >>> >> ...... >>> >> }, >>> >> required = {"broker_list", "kafka_topic", "key"} >>> >> ...... >>> >> ``` >>> >> >>> >> >>> >> I think the key field should be optional, because when a message is >sent >>> >> to the Kafka service, the key can be specified or empty. So when the >>> key is >>> >> empty, it can be used normally. >>> >> >>> >> >>> >> The key should be optional in the schema: >>> >> >>> >> >>> >> ``` >>> >> ...... >>> >> properties = { >>> >> ...... >>> >> key = {type = "string"}, >>> >> ...... >>> >> }, >>> >> required = {"broker_list", "kafka_topic"} >>> >> ...... >>> >> ``` >>> >> >>> >> >>> >> Related issue:https://github.com/apache/apisix/issues/2778 >>> >> >>> >> -- >>> >Thanks, >>> >Ming Wen, Apache APISIX PMC Chair >>> >Twitter: _WenMing >>>
