After creating a Connector and a SourceTask objects in Kafka with Java I cannot figure out what can be done with SourceRecords returned form poll() methd of the SourceTask object.
How can I push the record in the topic which is a parameter of the SourceRecocd?
I mean we have the creation of SourceRecords in poll()
method like this:
records.add(new SourceRecord(sourcePartition, sourceOffset, config.topicName, Schema.STRING_SCHEMA, message));
So now how to produce a message in the topic which is the config.topicName
above?
Thanks in advance.