For this parameters, if consumer.timeout.ms is set to 0, whenever I call ConsumerIterator's hasNext(), if there is a message available, a timeout exception will be thrown. Is my understanding correct? Thanks.
Throw a timeout exception to the consumer if no message is available for consumption after the specified interval
Actually, hasNext() only returns false when the consumer connector is shutdown. Typically, you either set consumer.timeout.ms to -1 or a value larger than 0. If it's set to 0, my guess is that it throws a timeout exception immediately if there is no more message.
Jun On Tue, Dec 17, 2013 at 4:57 PM, Guozhang Wang <[EMAIL PROTECTED]> wrote:
Jun is right. Just checked the code. If you set consumer.timeout.ms to 0 then if there is no message a ConsumerTimeoutException will be thrown right away. On Tue, Dec 17, 2013 at 9:08 PM, Jun Rao <[EMAIL PROTECTED]> wrote:
Apache Lucene, Apache Solr and all other Apache Software Foundation projects and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext