-
-
Save pramodpk89/a04beb655387c26e8cc3389a3ef50758 to your computer and use it in GitHub Desktop.
This file contains 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 characters
package com.ppk.kafkareader.service; | |
import lombok.SneakyThrows; | |
import org.json.simple.JSONObject; | |
import org.json.simple.parser.JSONParser; | |
import org.springframework.kafka.annotation.KafkaListener; | |
import org.springframework.stereotype.Service; | |
@Service | |
public class kafkaService { | |
@KafkaListener(topics = "first_topic") | |
@SneakyThrows | |
public void readPayload(String payload) { | |
System.out.println("Message read from kafka "+payload); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment