consumerConfig()consumerConfig(boolean)producerConfig()pollMessages(String, int, Deserializer, Deserializer) instead.
This method is deprecated due to the switch to Kafka 0.9. The new API can return more than the expected number of messages unless manual offset management is performed. Since it is impossible to ensure that the passed-in KafkaConsumer has auto commit disabled, this method should not be used.
pollStringMessages(String, int) instead
This method is deprecated because it silently creates a new consumer on each invocation -- which could lead to
some mesages being read more than once. It also suffers from the problems described in the deprecation notice for
readMessages(KafkaConsumer, String, int, int) as well.
Copyright © 2016. All rights reserved.