宋子宪博客

ActivenMQ的Broker小型内嵌服务器

依然maven依赖

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.9.9.1</version>
</dependency>

Broker启动类

/**
 * @author songzixian
 * @create 2019-07-19 上午 7:42
 * @description
 */
public class EmbedBroker {

    public static void main(String[] args) throws Exception {
        BrokerService brokerService = new BrokerService();

        brokerService.setUseJmx(true);
        brokerService.addConnector("tcp://localhost:61616");

        brokerService.start();
    }
}

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »