package com.chushang.task.consumer;

import com.chushang.common.core.constant.ServiceConstant;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @auther: zhao
 * @date: 2024/6/12 15:03
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = ServiceConstant.TASK, consumerGroup = ServiceConstant.TASK_CONSUMER_GROUP)
public class TaskConsumerService implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.info("msg {}", message);
    }
}
