tzssangglass commented on a change in pull request #4876:
URL: https://github.com/apache/apisix/pull/4876#discussion_r694760826



##########
File path: apisix/plugins/kafka-logger.lua
##########
@@ -209,7 +209,9 @@ function _M.log(conf, ctx)
     broker_config["producer_type"] = conf.producer_type
 
     local prod, err = core.lrucache.plugin_ctx(lrucache, ctx, nil, 
create_producer,
-                                               broker_list, broker_config)
+                                               broker_list, broker_config, 
conf.cluster_name)
+    core.log.info("kafka cluster name ", conf.cluster_name, ", broker_list[1] 
port ",
+                  prod.client.broker_list[1].port, "\n")

Review comment:
       update

##########
File path: apisix/plugins/kafka-logger.lua
##########
@@ -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},

Review comment:
       done




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to