You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Sourjya Dutta <so...@gmail.com> on 2019/12/30 20:04:20 UTC

Issue on Spring boot Kafka listener

Hi,

Kafka is installed in CentOs machine. Kafka version is 2.4.0.
I have written sample java code which consumes data from topic. I am using

@KafkaListener(topics = "Device")
public void receive(final String record) {
System.out.println(record);
}
This annotation is mapped with one function(recieve) and data which is present on topic Device will be mapped to functional argument(record).

I have executed on my local machine and data is coming to variable record. Now I have created the jar file and ran it on centos machine. Where the kafka itself is running. While I am pushing data to kafka, my jar file is not getting the data until and unless I am pressing any key from keyboard. Please let me know any information is required from my side.