The consumer iterator by default blocks if there are no new messages. You
can configure it to be non-blocking. See consumer.timeout.ms
On Wed, Jul 10, 2013 at 11:55 PM, Ankit Jain <[EMAIL PROTECTED]>wrote:
> Hi all,
> I have a Kafka 0.8 cluster of two nodes on same machine with 4 partitions
> and communicating through a single zookeeper.
> I am producing data using the Kafka Producer using the following code:
> KeyedMessage<String, byte> data = new KeyedMessage<String,
> byte>(topic, input);
> I am able to consume the data from a topic using the Kafka console
> consumer as well as simple consumer but it is blocking the iterator at High
> Level consumer.
> High Level Consumer -
> Simple Consumer -
> The configuration for High Level consumer is default configuration.
> Thanks for your help in advance.
> Ankit Jain
> NOTE: This message may contain information that is confidential,
> proprietary, privileged or otherwise protected by law. The message is
> intended solely for the named addressee. If received in error, please
> destroy and notify the sender. Any use of this email is prohibited when
> received in error. Impetus does not represent, warrant and/or guarantee,
> that the integrity of this communication has been maintained nor that the
> communication is free of errors, virus, interception or interference.
Evelina 2013-12-16, 15:34