kafka simpleconsumer question

2014-07-01 Thread Weide Zhang
Hi , Just want to ask some basic question about kafka simple consumer. 1. if I'm using simple consumer and doesn't really depend on zookeeper to manage partition offset. (application manage offset themselves). Will that remove the zookeeper dependency for consumer ? 2. if zookeeper dies, will sim

Re: kafka simpleconsumer question

2014-07-01 Thread Guozhang Wang
Hi Weide, 1. The old consumer is still depending on the ZK no matter if you use ZK for offsets or not, since it depends on ZK for group manage anyways. In the new consumer (0.9) we have completely the ZK dependance. 2. Yes, it queries the broker for leader info. 3. You can use a single consumer

Re: kafka simpleconsumer question

2014-07-10 Thread Weide Zhang
Hi Guozhang, Just a follow up question. Is one simpleconsumer instance can be shared by multiple threads and fetch data from multiple topics and commit offsets ? It seems all the implementation are synchronized which means it can be shared between multiple threads ? Is my understanding correct ?

Re: kafka simpleconsumer question

2014-07-10 Thread Guozhang Wang
Yes it can be shared. Guozhang On Thu, Jul 10, 2014 at 11:12 AM, Weide Zhang wrote: > Hi Guozhang, > > Just a follow up question. Is one simpleconsumer instance can be shared by > multiple threads and fetch data from multiple topics and commit offsets ? > > It seems all the implementation are

Re: kafka simpleconsumer question

2014-07-11 Thread Weide Zhang
Hi Guozhang, I have a couple of more questions about using the simpleConsumer API call. It seems when constructing the fetchRequest, it need a parameter called FetchSize. Do you know what's the purpose of this parameter ? Does that mean the call to Kafka won't be returned until the response mess

Re: kafka simpleconsumer question

2014-07-12 Thread Guozhang Wang
Weide, This FetchSize is the fetch.message.max.bytes config in consumer configs: http://kafka.apache.org/documentation.html#consumerconfigs Guozhang On Fri, Jul 11, 2014 at 6:18 PM, Weide Zhang wrote: > Hi Guozhang, > > I have a couple of more questions about using the simpleConsumer API ca