I have created a local kafka with local zookeeper, and testing with this setup, I am able to poll properly. So it is something to do with my setup.
On Thu, Dec 10, 2015 at 2:45 PM Jason Gustafson <ja...@confluent.io> wrote: > You just have to set "group.id" in the configuration. Please also include > the version of the broker. > > -Jason > > On Thu, Dec 10, 2015 at 12:38 PM, Kevin Carr <kscar...@gmail.com> wrote: > > > Sounds like a plan. I will see about getting that. > > > > I don't have to register a group id do I? > > > > On Thu, Dec 10, 2015, 2:37 PM Jason Gustafson <ja...@confluent.io> > wrote: > > > > > And just to be clear, the broker is on 0.9? Perhaps you can enable > debug > > > logging and send a snippet? > > > > > > -Jason > > > > > > On Thu, Dec 10, 2015 at 12:22 PM, Kevin Carr <kscar...@gmail.com> > wrote: > > > > > > > In this case I have just published the message via a producer and > > > > connecting to the same broker list to consume. > > > > > > > > On Thu, Dec 10, 2015, 2:18 PM Jason Gustafson <ja...@confluent.io> > > > wrote: > > > > > > > > > Hi Kevin, > > > > > > > > > > At the moment, the timeout parameter in poll() really only applies > > when > > > > the > > > > > consumer has an active partition assignment. In particular, it will > > > block > > > > > indefinitely to get that assignment. If there are no brokers to > > connect > > > > to > > > > > or if you accidentally point it to an 0.8 cluster, it will probably > > > block > > > > > forever. This is most likely what is happening in your test case. > > This > > > > is a > > > > > known issue, but surprisingly difficult to handle in a reasonable > way > > > due > > > > > to the fact that the consumer is single-threaded. We are working on > > > this > > > > > problem, but for now, the best solution is to use wakeup() to break > > > from > > > > > the poll() from an external thread. > > > > > > > > > > -Jason > > > > > > > > > > On Thu, Dec 10, 2015 at 11:50 AM, Kevin Carr <kscar...@gmail.com> > > > wrote: > > > > > > > > > > > I am configuring the way it says in the api doc. > > > > > > > > > > > > Topic is 1 partition > > > > > > I set the group.id, and subscribe to the topic. > > > > > > > > > > > > If I call poll(100) the function never returns. I have to stop > the > > > > unit > > > > > > test, because it never stops. I have waited for up to 10 > minutes. > > > > > > > > > > > > Any Ideas? > > > > > > > > > > > > Thanks for your help. > > > > > > > > > > > > > > > > > > > > >