启动多个ActiveMQ,采用shared JDBC模式
ActiveMQ Jdbc持久化配置
启动了两个 端口分别为 61616 、61617
package com.nk.activemq.basic;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.junit.jupiter.api.Test;
import javax.jms.*;
/**
* @author nelson
*/
public class ActiveMQTest {
public static void main(String[] args) throws JMSException {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
Connection connection = null;
try {
connection = factory.createConnection();
connection.start();
//表示默认是持久