Re: Consumer poll returning 0 results

2017-10-26 Thread Susheel Kumar
Thank you Ted, Konstantine. Now I understand. The option 1 worked and if I produce more records after consumer started, I can see it being returned. Though option 2 as you described should work but setting auto.offset.reset to earliest doesn't seems to work and acts like without

Re: Consumer poll returning 0 results

2017-10-25 Thread Konstantine Karantasis
Are you producing any records after you start the consumer? By default, Kafka consumer starts with auto.offset.reset == latest ( https://kafka.apache.org/documentation/#newconsumerconfigs), which means that if the consumer doesn't find a previous offset for its consumer group (e.g. the first time

Re: Consumer poll returning 0 results

2017-10-25 Thread Ted Yu
Can you provide a bit more information ? Release of Kafka Java / Scala version Thanks On Wed, Oct 25, 2017 at 6:40 PM, Susheel Kumar wrote: > Hello Kafka Users, > > I am trying to run below sample code mentioned in Kafka documentation under > Automatic Offset Committing

Consumer poll returning 0 results

2017-10-25 Thread Susheel Kumar
Hello Kafka Users, I am trying to run below sample code mentioned in Kafka documentation under Automatic Offset Committing for a topic with 1 partition (tried with 3 and more partition as well). Create command as follows bin/kafka-topics.sh --create --zookeeper :2181 --replication-factor 3