spacewander commented on code in PR #8693:
URL: https://github.com/apache/apisix/pull/8693#discussion_r1089874412
##########
apisix/plugins/error-log-logger.lua:
##########
@@ -272,6 +333,52 @@ local function send_to_clickhouse(log_message)
end
+local function create_producer(broker_list, broker_config, cluster_name)
+ core.log.info("create new kafka producer instance")
+ return producer:new(broker_list, broker_config, cluster_name)
+end
+
+
+local function send_to_kafka(log_message)
+ core.log.info("sending a batch logs to kafka brokers: ",
+ core.json.delay_encode(config.kafka.brokers))
+
+ local broker_config = {}
+ broker_config["request_timeout"] = config.timeout * 1000
+ broker_config["producer_type"] = config.kafka.producer_type
+ broker_config["required_acks"] = config.kafka.required_acks
+
+ local metadata = plugin.plugin_metadata(plugin_name)
Review Comment:
A clone of c1 still has a c1's value.
Maybe we can get the c2 in `send` like what we have done in `process`.
--
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]