consumer read from specific partition

2014-08-14 Thread Josh J
Hi, Suppose I have N partitions. I would like to have X different consumer threads ( X N) read from a specified set of partitions. How can I achieve this? Thanks, Josh

Re: consumer read from specific partition

2014-08-14 Thread Sharninder
Implement the low level Simple Consumer. -- Sharninder On Thu, Aug 14, 2014 at 2:16 PM, Josh J joshjd...@gmail.com wrote: Hi, Suppose I have N partitions. I would like to have X different consumer threads ( X N) read from a specified set of partitions. How can I achieve this? Thanks,

Re: consumer read from specific partition

2014-08-14 Thread Neha Narkhede
You can see an example of using the SimpleConsumer here https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example . On Thu, Aug 14, 2014 at 3:23 AM, Sharninder sharnin...@gmail.com wrote: Implement the low level Simple Consumer. -- Sharninder On Thu, Aug 14, 2014

Re: Correct way to handle ConsumerTimeoutException

2014-08-14 Thread Chen Wang
Got it. Thanks guys! Chen On Wed, Aug 13, 2014 at 9:35 AM, Neha Narkhede neha.narkh...@gmail.com wrote: I am using consumer.timeout.ms to force a consumer jump out hasNext call, which will throw ConsumerTimeoutException. Yes, this is the downside of the blocking iterator approach. If you