activemq设置简单安全验证

activemq默认没有为连接启用安全机制,需要手工启用

activemq.xml中
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <value>file:${activemq.base}/conf/credentials.properties</value>
    </property> 
</bean>


/conf/credentials.properties是用户密码保存文件

还需要在activemq.xml中加入插件
<plugins>   
    <simpleAuthenticationPlugin>   
      <users>   
        <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>   
      </users>   
    </simpleAuthenticationPlugin>   
</plugins>

猜你喜欢

转载自shinelain.iteye.com/blog/1596134