nghiaxlee commented on a change in pull request #614: MINIFICPP-732 - Add 
property to expose librdkafka "debug" values for …
URL: https://github.com/apache/nifi-minifi-cpp/pull/614#discussion_r305287775
 
 

 ##########
 File path: extensions/librdkafka/PublishKafka.cpp
 ##########
 @@ -129,9 +131,16 @@ bool PublishKafka::configureNewConnection(const 
std::shared_ptr<KafkaConnection>
 
   auto key = conn->getKey();
 
+  if (context->getProperty(DebugContexts.getName(), value) && !value.empty()) {
+    rd_kafka_conf_set(conf_, "debug", value.c_str(), errstr, sizeof(errstr));
 
 Review comment:
   From what I saw on the logs, we can only know after sending the data, and 
librdkafka will terminate before the first invalid setting 
("topic,broker,mewrong,msg" then only "topic,broker" are applied). For 
validation, I know that I can split the string by "," then check whether they 
are valid or not. If you have better idea, please let me know.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to