package com.fzm.mall.server.front.mq;

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

/**
 * @author tdz
 * @date 2021/02/22 11:26
 */
@Configuration
public class RabbitConf {
    /**
     * 注册队列
     */
    @Bean
    public Queue queueMallRegister() {
        return new Queue(MqConst.QUEUE_MALL_REGISTER);
    }

    /**
     * 声明商品上链队列
     */
    @Bean
    public Queue queueMallGoodChain() {
        return new Queue(MqConst.QUEUE_MALL_GOOD_CHAIN);
    }

    /**
     * 声明发行token队列
     */
    @Bean
    public Queue queueMallCreateToken() {
        return new Queue(MqConst.QUEUE_MALL_CREATE_TOKEN);
    }

    /**
     * 声明增发token队列
     */
    @Bean
    public Queue queueMallAddToken() {
        return new Queue(MqConst.QUEUE_MALL_ADD_TOKEN);
    }

    /**
     * 声明支付队列
     */
    @Bean
    public Queue queueMallPay() {
        return new Queue(MqConst.QUEUE_MALL_PAY);
    }

}
