package com.xhkjedu.sstudy.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.resourceToPdfQueue}")
    private String resourceToPdfQueue;
    @Value("${rabbitmq.resourceTransferQueue}")
    private String resourceTransferQueue;
    @Value("${rabbitmq.resourceUnZipQueue}")
    private String resourceUnZipQueue;
    @Value("${rabbitmq.resourceDelQueue}")
    private String resourceDelQueue;
    @Value("${rabbitmq.resourceHandleQueue}")
    private String resourceHandleQueue;
    @Value("${rabbitmq.imgMergeQueue}")
    private String imgMergeQueue;
    @Value("${rabbitmq.imgMergeHandleQueue}")
    private String imgMergeHandleQueue;

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

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

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

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

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

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

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