一、複製兩份同樣的apache-activemq-5.9.1,以下html
二、修改apache-activemq-5.9.1-file的配置文件\conf\activemq.xml,修改點以下web
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost-file" dataDirectory="${activemq.data}">
brokerName要不與原來的衝突apache
<transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> </transportConnectors>
<transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --> <transportConnector name="openwire" uri="tcp://0.0.0.0:61617?maximumConnections=10000&wireFormat.maxFrameSize=1048576000&"/> <transportConnector name="amqp" uri="amqp://0.0.0.0:5673?maximumConnections=10000&wireFormat.maxFrameSize=1048576000&"/> <transportConnector name="stomp" uri="stomp://0.0.0.0:61618?maximumConnections=10000&wireFormat.maxFrameSize=1048576000&"/> <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1884?maximumConnections=10000&wireFormat.maxFrameSize=1048576000&"/> <transportConnector name="ws" uri="ws://0.0.0.0:61619?maximumConnections=10000&wireFormat.maxFrameSize=1048576000&"/> </transportConnectors>
transportConnector的端口要不與原來的衝突tcp
三、修改apache-activemq-5.9.1-file的配置文件\conf\jetty.xml,修改點以下code
<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"> <!-- the default port number for the web console --> <property name="port" value="8161"/> </bean>
<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"> <!-- the default port number for the web console --> <property name="port" value="8162"/> </bean>
jettyPort的端口要不與原來的衝突orm
四、若是使用了jmx,須要修改apache-activemq-5.9.1-file的配置文件\conf\activemq.xml,修改點以下xml
<managementContext> <managementContext createConnector="true" connectorPort="11099"/> </managementContext>
connectorPort的端口要不與原來的衝突,詳見http://activemq.apache.org/jmx.htmlhtm