adamdebreceni commented on a change in pull request #1037:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1037#discussion_r599599061



##########
File path: extensions/librdkafka/PublishKafka.cpp
##########
@@ -925,12 +931,10 @@ void PublishKafka::onTrigger(const 
std::shared_ptr<core::ProcessContext> &contex
     }
 
     std::string kafkaKey;
-    kafkaKey = "";
-    if (context->getDynamicProperty(MessageKeyField, kafkaKey, flowFile) && 
!kafkaKey.empty()) {
-      logger_->log_debug("PublishKafka: Message Key Field [%s]", kafkaKey);
-    } else {
+    if (!context->getProperty(KafkaKey, kafkaKey, flowFile) || 
kafkaKey.empty()) {

Review comment:
       I don't think this ever worked since we try to get the `MessageKeyField` 
as if it were a dynamic property (`context->getDynamicProperty`) and since it 
is not a dynamic property we always did fall back to the flow file uuid
   




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


Reply via email to