Hi all; I use kafka 0.9.0.1. I publish 10 messages to my kafka server, but when i try to use my consumer, it does not retriev any messages. In the following code snippet, it prints 111 and 222 and thread runs forever without sending any records :(
I set consumer.timeout property, but nothing helps me.. Can anybody help me? public void run() { try { consumer.subscribe(topics); System.out.println("111"); while (true) { System.out.println("2222"); ConsumerRecords<String, RawFile> records = consumer.poll(100); System.out.println("3333 : "+records.count()); for (ConsumerRecord<String, RawFile> record : records) { System.out.println("4444"); FileProcessor processor = new FileProcessor(); processor.processFile(record.value()); } } } catch (Throwable e) { e.printStackTrace(); System.out.println("eror in polling"); } finally { consumer.close(); } } -- -Ratha http://vvratha.blogspot.com/