Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka, mail # user - Re: Iterator Question

Copy link to this message
Re: Iterator Question
Neha Narkhede 2013-10-01, 16:15
It is recommended you use the iterator() API since that invokes Kafka's
ConsumerIterator which has state management logic for consuming Kafka
messages properly. If you use toIterator(), it just gives you a plain Scala
iterator over KafkaStream.

On Tue, Oct 1, 2013 at 6:03 AM, Sybrandy, Casey <

> Hello,
> What's the difference between the .toIterator() and .iterator() methods
> for KafkaStream?  I see they return different types and one of my coworkers
> is noticing that when he uses .toIterator() will block at times where
> .iterator() will not block.
> Casey