apache-kafkaapache-nifi

Send custom message to Kafka topic


The task is to send message with concrete value to Kafka topic.

For example, I want to send "someValue" as plain text.

What Kafka property in PublishKafkaRecord_2_6 should I use for this purporse?

I see, for example, "FreeFormTextRecordSetWriter" as a service, which writes the contents of a RecordSet as free-form text.

But where inside PublishKafkaRecord_2_6 I can set my "someValue" to publish it in target topic.


Solution

  • where inside PublishKafkaRecord_2_6 I can set my "someValue"

    You wouldn't. The Kafka processor just sets up the producer for Kafka client details and serialization.

    You'd setup an incoming processor, such as using GenerateFlowFile