Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How can you set the Message Key Field property in the PublishKafkaRecord Processor?

avatar
Explorer

Hi,

I am using the PublishKafkaRecord processor to write messages to a Kafka topic. I am using the CSVReader for the Record Reader property and the AvroRecordSetWriter for the Record Writer property. I would like to set the message key of each message written to Kafka using one of the fields of the csv file by setting the Message Key Field property (see the image below). Please let me know if this is possible or an alternative approach where it can be set on a per record basis?

processor.png

Many thanks,

Paul

1 ACCEPTED SOLUTION

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Explorer

Thanks Bryan,

I am providing a schema to the CSVReader and it was simple as using the field name defined in the schema in the Message Key Field property.

Cheers,

Paul