package cn.edu.zjvtit.cloudstorage.dataservice.rabbitmq;

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

@Configuration
public class TopicRabbitConfig {

    final static String apiMessage = "apiServers";//定义静态字符串api消息
    final static String dataMessage = "dataServers";//定义静态字符串data消息

    @Bean//实例化
    public Queue queueApi() {
        return new Queue(TopicRabbitConfig.apiMessage);
    }//返回新的api消息到队列里

    @Bean//实例化
    public Queue queueData() {
        return new Queue(TopicRabbitConfig.dataMessage);
    }//返回新的data消息到队列里
//
//    @Bean
//    TopicExchange exchange() {
//        return new TopicExchange("topicExchange");
//    }
}