wuxw7
2017-04-26 074a0d6b7427960eba09b76c77d8df69ee5d4d2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.java110.order.mq;
 
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
 
import javax.jms.Queue;
import javax.jms.Topic;
 
/**
 * Created by wuxw on 2017/4/17.
 */
@ConfigurationProperties(prefix = "mq.queue.name",locations="classpath:mq/mq.properties")
public class MqConfig {
 
    @Bean
    public Queue queue() {
        return new ActiveMQQueue("sample.queue");
    }
 
    @Bean
    public Topic deleteOrderTopic() {
        return new ActiveMQTopic("sample.topic");
    }
}