Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 06-21-2018 01:14 PM
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?
Many thanks,
Paul
Created 06-21-2018 02:29 PM
There should be a property called "Message Key Field" which is the name of the field in the records that you want to use as the message key. It depends how your CsvReader is configured... if it is creating a schema from the column headers then this value would be the name of the column, or if you are providing a specific schema then it would be the name of the field from the schema your provided.
Created 06-21-2018 02:29 PM
There should be a property called "Message Key Field" which is the name of the field in the records that you want to use as the message key. It depends how your CsvReader is configured... if it is creating a schema from the column headers then this value would be the name of the column, or if you are providing a specific schema then it would be the name of the field from the schema your provided.
Created 06-21-2018 03:03 PM
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