Last active
August 1, 2020 18:12
-
-
Save pradeekpmohandas/485c827cfa82aa9caa886f30341da8c8 to your computer and use it in GitHub Desktop.
Revisions
-
pradeekpmohandas revised this gist
Aug 1, 2020 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,10 @@ @Log4j2 @Service @KafkaListener(id = "temp-id",topics = "#{'${spring.kafka.incoming.topic}'.split(',')}") public class Consumer { @KafkaHandler public void consume(Student student,@Header(KafkaHeaders.OFFSET) String offset) log.info("offset:" + offset + "Incoming info: "+student); } } -
pradeekpmohandas revised this gist
Aug 1, 2020 . 1 changed file with 5 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,12 +3,9 @@ @KafkaListener(id = "temp-id", groupId = "temp-groupID", topics = "#{'${spring.kafka.incoming.topic}'.split(',')}") public class Consumer { @KafkaHandler public void consume(Student student, @Header(KafkaHeaders.RECEIVED_TOPIC) String topicName, @Header(KafkaHeaders.OFFSET) String offset) log.info(" topic: " + topicName + ", offset: " + offset + "Incoming info: "+student); } } -
pradeekpmohandas created this gist
Aug 1, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ @Log4j2 @Service @KafkaListener(id = "temp-id", groupId = "temp-groupID", topics = "#{'${spring.kafka.incoming.topic}'.split(',')}") public class Consumer { @KafkaHandler public void consume(Student student, @Header(KafkaHeaders.RECEIVED_TOPIC) String topicName, @Header(KafkaHeaders.OFFSET) String offset){ log.info(" topic: " + topicName + ", offset: " + offset + "Incoming info: "+student); } }