Hi all;
I publish a java object and try to consume it..
I have a poll method to consume objects, but it never returns any
objects..My program runs forever.(?)
*ConsumerThread*
public void run() {
try {
consumer.subscribe(topics);
Iterator<ConsumerRecord<String, File>> it = consumer.poll(1000).iterator();
while (it.hasNext()) {
ConsumerRecord<String, File> record = it.next();
FileProcessor processor = new FileProcessor();
processor.processFile(record.value());
System.out.println("-----" + ": " + record);
When i debug it never goes inside the while loop. Why is that?
I publish object like this;
producer.send(new ProducerRecord<String, File>(topic, file));
Thanks
--
-Ratha
http://vvratha.blogspot.com/