activemq-broker 模块 test/java 目录下有个 IDERunner 类:
public class IDERunner {
private static final boolean TRANSPORT_TRACE = false;
public static void main(String[]args) throws Exception {
BrokerService brokerService = new BrokerService();
// brokerService.addConnector(
// "tcp://0.0.0.0:61616?trace=" + TRANSPORT_TRACE +
// "&transport.wireFormat.maxFrameSize=104857600");
brokerService.setPersistent(false);
brokerService.setUseJmx(false);
brokerService.setAdvisorySupport(false);
brokerService.start();
brokerService.waitUntilStopped();
}
}
注释掉 brokerService 调用 addConnector 方法的三行代码,然后 debug 运行该类的 main 方法。
More »