private void consumeMessages() {
final ConsumerConnector consumer =
kafka.consumer.Consumer.createJavaConsumerConnector(createConsumerConfig());
final Map<String, Integer> topicCountMap =
ImmutableMap.of(topic, 1);
final StringDecoder decoder =
new StringDecoder(new VerifiableProperties());
final Map<String, List<KafkaStream<String,String>>> consumerMap =
consumer.createMessageStreams(topicCountMap, decoder, decoder);
final KafkaStream<String,String> stream =
consumerMap.get(topic).get(0);
final ConsumerIterator<String,String> iterator = stream.iterator();