martinzink commented on code in PR #1885:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1885#discussion_r1820282338


##########
extensions/kafka/PublishKafka.cpp:
##########
@@ -376,10 +326,9 @@ void PublishKafka::onSchedule(core::ProcessContext& 
context, core::ProcessSessio
   logger_->log_debug("PublishKafka: Max Flow Segment Size [{}]", 
max_flow_seg_size_);
 
   // Attributes to Send as Headers
-  std::string value;
-  if (context.getProperty(AttributeNameRegex, value) && !value.empty()) {
-    attributeNameRegex_ = utils::Regex(value);
-    logger_->log_debug("PublishKafka: AttributeNameRegex [{}]", value);
+  if (const auto attribute_name_regex = 
context.getProperty(AttributeNameRegex)) {

Review Comment:
   good catch, 
https://github.com/apache/nifi-minifi-cpp/pull/1885/commits/5b8a9e84ecd1a067f39e51666f47fd98f79ba10c#diff-8c7db1de63f906d0cc51e10730a764ddc94d61e8a5bc8d24154d05af025afa09L340



-- 
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