feat: export some importent params for kafka-client#7266
Conversation
spacewander
left a comment
There was a problem hiding this comment.
Let's add some doc for the new fields
| -- see https://github.com/doujiang24/lua-resty-kafka#new-1 | ||
| cluster_name = {type = "integer", minimum = 1, default = 1}, | ||
| -- config for lua-resty-kafka, default value is same as lua-resty-kafka | ||
| kafka_batch_num = {type = "integer", minimum = 1, default = 200}, |
There was a problem hiding this comment.
Would be better to use producer prefix instead of kafka? Since this plugin is already a kafka logger.
There was a problem hiding this comment.
good idea,i will change it
| kafka_batch_num = {type = "integer", minimum = 1, default = 200}, | ||
| kafka_batch_size = {type = "integer", minimum = 0, default = 1048576}, | ||
| kafka_max_buffering = {type = "integer", minimum = 1, default = 50000}, | ||
| kafka_time_linger = {type = "integer", minimum = 1, default = 1} |
There was a problem hiding this comment.
Why don't we call it flush_time?
There was a problem hiding this comment.
because this params named “linger.ms” in official kafka client producer and other popular kafka client like sarama,
and i don‘t know why named “flush_time” in resty-kafka......i think call it like “linger” is friendly for user google it....
spacewander
left a comment
There was a problem hiding this comment.
Please make the CI pass, thanks!
| | include_resp_body| boolean | optional | false | [false, true] | Whether to include the response body. The response body is included if and only if it is `true`. | | ||
| | include_resp_body_expr | array | optional | | | When `include_resp_body` is true, control the behavior based on the result of the [lua-resty-expr](https://github.com/api7/lua-resty-expr) expression. If present, only log the response body when the result is true. | | ||
| | cluster_name | integer | optional | 1 | [0,...] | the name of the cluster. When there are two or more kafka clusters, you can specify different names. And this only works with async producer_type.| | ||
| | producer_batch_num | integer | optional | 200 | [1,...] | `batch_num` param in [lua-resty-kafka],merge message and batch send to server, unit is message count | |
There was a problem hiding this comment.
Should be [lua-resty-kafka](link to lua-resty-kafka)?
|
Hi @mikawudi , thanks for the contribution! Here is the Contributor T-shirt form[1], if you're interested, kindly take a look :) |
export 4 importent params about kafka-producter for kafka-logger plugins
if no problem on this commit, i will edit docs later