首页 > 技术文章 > activemq 学习系列(二) 常用配置

bmw320li 2018-11-22 16:58 原文

ActiveMq 主要配置文件

1、设置登录账号和密码

找到  conf/jetty.xml 文件

    <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
        <property name="name" value="BASIC" />
        <property name="roles" value="user,admin" />
        <!-- set authenticate=false to disable login -->
        <property name="authenticate" value="false" />
    </bean>

将property name为authenticate的属性value="false" 改为"true".

在  conf/jetty-realm.properties 文件中

# Defines users that can access the web (console, demo, etc.)
# username: password [,rolename ...]
admin: admin, admin
user: user, user

设置账号和密码:格式为  用户名:密码,角色

 

2、后台管理端口

conf/jetty.xml

<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>

3、持久化方式

conf/activemq.xml

<persistenceAdapter>
            <kahaDB directory="${activemq.data}/kahadb"/>
        </persistenceAdapter>

 

推荐阅读