@Override
    public void onPartitionsRevoked(Collection<TopicPartition> partitions) {
        Utils.printOut("Revoked partitions: %s", partitions);
        // this can be used to commit pending offsets when using manual commit and EOS is disabled
    }
A simple consumer thread that subscribes to a topic, fetches new records and prints them.
The thread does not stop until all records are completed or an exception is raised.
examples/src/main/java/kafka/examples/Consumer.java