[ 
https://issues.apache.org/jira/browse/NIFI-14470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945179#comment-17945179
 ] 

Paul Grey commented on NIFI-14470:
----------------------------------

Hi.  I just tested this on apache/main (as of a0ca48b).  PublishKafka seems to 
behave as expected.  I added two attributes to the GenerateFlowFile:
 * kafka.key = "a-kafka-key"
 * another.key = "another-key"

 

When I publish and consume the FlowFile (via PublishKafka, ConsumeKafka):
 * if I leave the attribute PublishKafka/"kafka.key" blank, then ConsumeKafka 
reads the kafka key as "a-kafka-key"
 * if I set the attribute PublishKafka/"kafka.key" as "other.key", then 
ConsumeKafka reads the kafka key as "another-key"

 

Maybe you can share a little more information about your scenario?

> PublishKafka not able to add kafka key from attribute
> -----------------------------------------------------
>
>                 Key: NIFI-14470
>                 URL: https://issues.apache.org/jira/browse/NIFI-14470
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M4
>            Reporter: Rabii
>            Priority: Major
>
> Using 2.0.0-M4 to migrate from PublishKafka2_6/ConsumeKafka2_6 to the new 
> PublishKafka/ConsumeKafka Processors since M4 supports both type of 
> processors.
>  
> Generate flowFile as json, attach an attribute to the messages, publish 
> message using PublishKafka and kafka key from the created attribute.
> Result message without key. It should be easy to reproduce.
> The same logic works with PublishKafka2_6



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to