Re: [Consumer code not working][Kafka Newbie]

2014-01-21 Thread Jun Rao
Will manual offset commit work? Thanks, Jun On Tue, Jan 21, 2014 at 8:11 AM, Abhishek Bhattacharjee < abhishek.bhattacharje...@gmail.com> wrote: > Thanks for the reply. > Actually in my use-case I need to control the offsets my self so should I > use SimpleConsumer instead of Group Consumers ?

Re: [Consumer code not working][Kafka Newbie]

2014-01-21 Thread Abhishek Bhattacharjee
Thanks for the reply. Actually in my use-case I need to control the offsets my self so should I use SimpleConsumer instead of Group Consumers ? On Tue, Jan 21, 2014 at 9:38 PM, Jun Rao wrote: > "auto.offset.reset" is only used when offsets don't exist in ZK. In your > case, the consumer likely

Re: [Consumer code not working][Kafka Newbie]

2014-01-21 Thread Jun Rao
"auto.offset.reset" is only used when offsets don't exist in ZK. In your case, the consumer likely already committed the offsets to ZK. So, after restarting, the consumer will resume from where it left off, instead of re-getting everything again. This is the expected behavior during normal operatio

Re: [Consumer code not working][Kafka Newbie]

2014-01-21 Thread Abhishek Bhattacharjee
I read the faqs and I added "auto.offset.reset" property in the configuration setting of storm. Then I ran my producer code and then I ran my consumer code when I ran the consumer code it printed all the messages that were created by producer but after stopping the consumer when I ran it again it d

Re: [Consumer code not working][Kafka Newbie]

2014-01-20 Thread Jun Rao
Could you check the following FAQ? https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-Whydoesmyconsumernevergetanydata ? https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-Myconsumerseemstohavestopped,why ? Thanks, Jun On Mon, Jan 20, 2014 at 7:22 AM, Abhishek Bhattacharjee < abh

Re: [Consumer code not working][Kafka Newbie]

2014-01-20 Thread Abhishek Bhattacharjee
Sorry I have sent both codes as consumer codes. This is the producer code. *Producer.java* package kafka.examples; import java.util.Properties; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; public class Producer/* extends Thread*/ { private final kafka.javaapi.pro

[Consumer code not working][Kafka Newbie]

2014-01-20 Thread Abhishek Bhattacharjee
Hello, I am new to kafka and facing some problem. My producer code works properly and sends data. But the consumer is not able to read it. Here are the codes for Producer and Consumer. Something is wrong with the Consumer.java code can someone please help with this. *Producer.java* package kafka