You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/09/29 09:42:57 UTC
[GitHub] [apisix] tokers commented on a diff in pull request #7999: feat: add brokers field to support set broker with the same host in kafka-logger plugin
tokers commented on code in PR #7999:
URL: https://github.com/apache/apisix/pull/7999#discussion_r983313758
##########
apisix/plugins/kafka-logger.lua:
##########
@@ -51,6 +52,26 @@ local schema = {
},
},
},
+ brokers = {
Review Comment:
Please mark the `broker_list` in the schema as deprecated.
##########
docs/en/latest/plugins/kafka-logger.md:
##########
@@ -37,7 +37,10 @@ It might take some time to receive the log data. It will be automatically sent a
| Name | Type | Required | Default | Valid values | Description |
| ---------------------- | ------- | -------- | -------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| broker_list | object | True | | | List of Kafka brokers (nodes). |
+| broker_list | deprecated | True | | | Use `brokers` instead. List of Kafka brokers. (nodes). |
+| brokers | array | True | | | List of Kafka brokers (nodes). |
+| brokers.host | string | True | | | The host of Kafka broker |
Review Comment:
```suggestion
| brokers.host | string | True | | | The host of Kafka broker, e.g., `192.168.1.1`. |
```
##########
t/plugin/kafka-logger2.t:
##########
@@ -340,6 +340,50 @@ qr/not found topic, retryable: true, topic: undefined_topic, partition_id: -1/
key= "key1",
},
},
+ {
+ input = {
+ brokers = {
+ },
+ kafka_topic = "test",
Review Comment:
Add another test case that the `host` or the `port` field is missing.
##########
apisix/plugins/kafka-logger.lua:
##########
@@ -251,3 +284,4 @@ end
return _M
+
Review Comment:
Remove the empty line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org