This screencast shows an example program reading a large file and publishing the offsets to a Kafka instance. It displays it consuming batches of 30 lines, then stopping and then resuming from where it stopped.
Note: the code is deliberately slowed down for a better screencast.