我爱编程

Linux ActiveMQ安装启动

2018-03-31  本文已影响0人  内卷星球

下载

安装

    bin目录:(windows下面的bat和unix/linux下面的sh) 启动ActiveMQ的启动服务就在这里

    conf目录: activeMQ配置目录,包含最基本的activeMQ配置文件

    data目录:activeMQ的日志文件目录

    webapps目录:系统管理员web控制界面文件

启动

./activemq start

访问

8161端口为ActiveMQ的web管理控制端口, 61616为ActiveMQ的通讯端口

配置

        <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&amp;wireFormat.maxFrameSize=104857600"/>
  <!--   <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>-->
  <!--   <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>-->
            <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
  <!--   <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>-->
        </transportConnectors>
    <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
             <!-- the default port number for the web console -->
        <property name="host" value="0.0.0.0"/>
        <property name="port" value="8161"/>
    </bean>
------broker 元素加上 schedulePeriodForDestinationPurge 的屬性 (10秒):------
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" schedulePeriodForDestinationPurge="10000">

------policyEntry 元素加上 gcInactiveDestinations 跟 inactiveTimoutBeforeGC 的屬性 (分別是開啟, 跟 20秒):------
<policyEntry topic=">" gcInactiveDestinations="true" inactiveTimoutBeforeGC="20000" >

关闭服务

./activemq stop
上一篇下一篇

猜你喜欢

热点阅读