In the class org.apache.kafka.connect.source.SourceTask there is the following method:
I have created my task which inherits from SourceTask and overrides commit(). In spites of offsets being recorded automatically be Kafka, method commit() is never invoked.
I have downloaded sources of Kafka and imported them to Intelij Idea.
Then I used "Find Usages" command. Idea found only one usage - in comments of method stop().