I am testing the Kafka High Level Consumer using the ConsumerGroupExample code from the Kafka site. I would like to retrieve all the existing messages on the topic called \
Properties props = new Properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("auto.offset.reset", "earliest"); props.put("group.id", UUID.randomUUID().toString());
This properties will help you.