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