package com.muyu.event;

import com.muyu.kafka.SimpleKafkaConsumer;
import lombok.extern.log4j.Log4j2;
import org.checkerframework.checker.units.qual.C;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 * kafka消费者启动类 KafkaRunner
 *
 * @author Yangle
 * Date 2024/6/20 21:42
 */
@Component
@Log4j2
public class KafkaRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {

        try {
            log.info("项目启动，开始动态启动kafka消费者");

        }catch (Exception e){
            log.error("启动kafka消费者失败，异常信息:{}",e);
        }

    }

}
