forked from kidgrow-microservices-platform

克 刘
2020-08-14 8cfbc9999ed8911726d9066edd3921e01a8d57fe
kidgrow-commons/kidgrow-rabbitmq-spring-boot-starter/src/main/java/com/kidgrow/rabbitmq/config/RabbitConfig.java
@@ -60,6 +60,11 @@
     */
    private String routingKeyName;
    /**
     * AI返回结果队列
     */
    private String AIEvaluationResults;
    @Bean
    public ConnectionFactory connectionFactory() {
        CachingConnectionFactory connectionFactory = new CachingConnectionFactory(host,port);
@@ -127,7 +132,32 @@
    }
    @Bean
    Binding bindingExchangeMessage(Queue kidgrowQueue, TopicExchange exchange) {
        return BindingBuilder.bind(kidgrowQueue).to(exchange).with(routingKeyName);
    Binding bindingExchangeMessage(TopicExchange exchange) {
        return BindingBuilder.bind(KidgrowQueue()).to(exchange).with(routingKeyName);
    }
    @Bean
    public Queue AIEvaluation() {
        return new Queue("AIEvaluation");
    }
    @Bean
    public Queue AIEvaluationResults() {
        return new Queue(AIEvaluationResults);
    }
    @Bean
    Binding bindingExchangeAIEvaluation(TopicExchange exchange) {
        return BindingBuilder.bind(AIEvaluation()).to(exchange).with(routingKeyName);
    }
    @Bean
    public Queue AdvancedEvaluation() {
        return new Queue("AdvancedEvaluation");
    }
    @Bean
    Binding bindingExchangeAdvancedEvaluation(TopicExchange exchange) {
        return BindingBuilder.bind(AdvancedEvaluation()).to(exchange).with(routingKeyName);
    }
}