package com.xhkjedu.slive.config;

import org.springframework.amqp.core.Queue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ywx
 * @classname RabbitConfig
 * @description
 * @date 2021/6/18 12:51
 **/
@Configuration
public class RabbitConfig {
    @Value("${rabbitmq.queue}")
    private String rabbitmqQueue;

    @Bean
    public Queue queueA() {
        return new Queue(rabbitmqQueue); //队列持久
    }

    //生产者mq-操作日志
    @Value("${rabbitmq.handleLogQueue}")
    private String handleLogQueue;

    @Bean
    public Queue handleLogQueue() {
        return new Queue(handleLogQueue);
    }
}
