package ru.soune.nocopy.kafka;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
import ru.soune.nocopy.dto.file.YandexSearchResponse;

@Component
@Slf4j
@RequiredArgsConstructor
public class MonitoringResultListener {

    private final ObjectMapper objectMapper;

//    @KafkaListener(topics = "monitoring-results", groupId = "dashboard")
    public void handleCommand(String message) {
        YandexSearchResponse yandexSearchResponse = objectMapper.convertValue(message, YandexSearchResponse.class);
    }
}
