package com.education.business.message.mq;

import com.education.business.message.param.TestQueueMessage;
import com.rabbitmq.client.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


/**
 * @author zjt
 * @create_at 2022年11月24日 0024 10:19
 * @since 2.0.1
 */
@Component
public class TestMqMessageListener extends AbstractMqMessageListener<TestQueueMessage> {

    private final Logger logger = LoggerFactory.getLogger(TestMqMessageListener.class);

    @Override
//    @RabbitListener(queues = "${rabbitmq.exam.queue}")
    public void onMessage(Message message, Channel channel) {
        super.onMessage(message, channel);
    }

    @Override
    public void doBizMessage(TestQueueMessage value) {
        logger.info("处理消息:{}", jackson.toJson(value));
    }
}
