@Ankit Singh
-> You can use List+Fetch File/SFTP processors to get the file from your local.
-> Then use Record oriented Kafka processors i.e PublishKafkaRecord* processor to read your incoming txt file
- Configure CSVReader controller service and give the matching AVRO schema.
- Configure Record Writer as AvroRecordSetWriter.
-> Now PublishKafkaRecord* processor reads the text file and writes the data in avro format to Kafka topic.
Flow:
1.ListFile (or) ListSFTP..etc
2.FetchFile (or) FetchSFTP..etc
3.PublishKafkaRecord*
Refer to these links for more details link1,link2