package com.nisum.kafka_poc.controller;

import com.nisum.kafka_poc.service.KafkaConsumerService;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/kafka")
public class KafkaConsumerController {

    private final KafkaConsumerService kafkaConsumerService;

    public KafkaConsumerController(KafkaConsumerService kafkaConsumerService) {
        this.kafkaConsumerService = kafkaConsumerService;
    }

    @GetMapping("/consume")
    public String consumeMessage() {

        return "Kafka Consumer is active, waiting for messages...";
    }

}