package com.pannk.listener;

import com.pannk.cons.Constant;
import com.pannk.entity.MessageEntity;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 广播消费
 *
 * @author wolf
 * @date 20-11-17
 */
@Component
public class FanoutReceiveListener {

    @RabbitListener(queues = {Constant.FANOUT_A, Constant.FANOUT_B, Constant.FANOUT_C})
    public void handleMsg(MessageEntity messageEntity) {
        System.out.println("Receive  msg " + messageEntity.getContent());
    }
}
