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.

Thanks,
Neha


On Tue, Oct 1, 2013 at 6:03 AM, Sybrandy, Casey <
casey.sybra...@six3systems.com> wrote:

> 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
>
>

Reply via email to