Your are commiting last offset by yourself. Try to remove code line 42 consumer.commitSync().
consumer.commitSync()
When you set enable.auto.commit to false, then you are responsible to commit by yourself and this is what you are doing with consumer.commitSync().
enable.auto.commit