-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(kafka-logger): add cluster name support #4876
Conversation
apisix/plugins/kafka-logger.lua
Outdated
@@ -60,7 +59,8 @@ local schema = { | |||
buffer_duration = {type = "integer", minimum = 1, default = 60}, | |||
inactive_timeout = {type = "integer", minimum = 1, default = 5}, | |||
batch_max_size = {type = "integer", minimum = 1, default = 1000}, | |||
include_req_body = {type = "boolean", default = false} | |||
include_req_body = {type = "boolean", default = false}, | |||
cluster_name = {type = "integer", default = 1}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to limit the minimum value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It confuses me, why name is an integer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It confuses me, why name is an integer?
follow the origin design: https://github.com/doujiang24/lua-resty-kafka#new-1
The third optional cluster_name specifies the name of the cluster, default 1 (yeah, it's number). You can Specifies different names when you have two or more kafka clusters. And this only works with async producer_type.
I think using numbers should satisfy the need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add it as a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we highlight that this is a design in the documents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
apisix/plugins/kafka-logger.lua
Outdated
@@ -60,7 +59,8 @@ local schema = { | |||
buffer_duration = {type = "integer", minimum = 1, default = 60}, | |||
inactive_timeout = {type = "integer", minimum = 1, default = 5}, | |||
batch_max_size = {type = "integer", minimum = 1, default = 1000}, | |||
include_req_body = {type = "boolean", default = false} | |||
include_req_body = {type = "boolean", default = false}, | |||
cluster_name = {type = "integer", default = 1}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add it as a comment?
@tzssangglass Please fix the conflicts. |
� Conflicts: � t/plugin/kafka-logger.t
What this PR does / why we need it:
about the cluster_name of kafka producer: https://github.com/doujiang24/lua-resty-kafka#new-1
Pre-submission checklist: