You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/01/22 16:21:03 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #710: MINIFICPP - 1110, 1111 - PublishKafka, OPC processors should config and

szaszm commented on a change in pull request #710: MINIFICPP - 1110,1111 - PublishKafka, OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r369660940
 
 

 ##########
 File path: extensions/librdkafka/PublishKafka.cpp
 ##########
 @@ -187,81 +239,77 @@ bool PublishKafka::configureNewConnection(const std::shared_ptr<KafkaConnection>
   auto key = conn->getKey();
 
   if (key->brokers_.empty()) {
-    logger_->log_error("There are no brokers");
-    return false;
+    throw Exception(PROCESS_SCHEDULE_EXCEPTION, "There are no brokers");
   }
   result = rd_kafka_conf_set(conf_, "bootstrap.servers", key->brokers_.c_str(), errstr.data(), errstr.size());
   logger_->log_debug("PublishKafka: bootstrap.servers [%s]", key->brokers_);
   if (result != RD_KAFKA_CONF_OK) {
-    logger_->log_error("PublishKafka: configure error result [%s]", errstr.data());
-    return false;
+    auto error_msg = utils::StringUtils::join_pack("PublishKafka: configure error result [%s]", errstr.data());
 
 Review comment:
   Maybe we could use the formatting library used by spdlog to create these strings? I've mentioned directly depending on the formatting library in [MINIFICPP-1121](https://issues.apache.org/jira/projects/MINIFICPP/issues/MINIFICPP-1121).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services