ActiveMQ Part 4 : 点点滴滴

## config\users.properties 配置后提示用户名或密码错误

     由于密码策略的限制: 密码必须大于(或等于)4位;

 

## \conf\activemq.xml 文件编码问题

     默认情况下,如果在这个文件中写入中文信息,则会导致服务启动异常;

     解决方法: 将该文件另存为 UTF-8 格式;

 

## 主题授权配置

     在进行主题的授权时,必须授权 ActiveMQ.Advisory.> 这个主题,否则会导致返回授权失败的信息;

     该主题的官方解释为:When you look at a broker using JMX you will see a number of topics starting with ActiveMQ.Advisory.. These are the destinations used by the Advisory Message feature of ActiveMQ which allows you to listen to the behaviour of the system.

     那么在授权时,要注意:

     1) 如果使用通配符授权所有主题,则 ActiveMQ.Advisory.> 这批主题也已经同时被授权,如下:

 1 <authorizationPlugin>
 2     <map>
 3         <authorizationMap>
 4             <authorizationEntries>
 5                 <authorizationEntry topic=">" write="admins" read="admins" admin="admins" />
 6                 <!-- <authorizationEntry topic="ActiveMQ.Advisory.>" write="admins" read="admins" admin="admins" /> -->
 7             </authorizationEntries>
 8         </authorizationMap>
 9     </map>
10 </authorizationPlugin>
View Code

 

     2) 如果没有通配符授权所有主题,则 ActiveMQ.Advisory.> 这批主题必须被授权,如下:

 1 <authorizationPlugin>
 2     <map>
 3         <authorizationMap>
 4             <authorizationEntries>
 5                 <authorizationEntry topic="TestTopic" write="admins" read="admins" admin="admins" />
 6                 <authorizationEntry topic="ActiveMQ.Advisory.>" write="admins" read="admins" admin="admins" />
 7             </authorizationEntries>
 8         </authorizationMap>
 9     </map>
10 </authorizationPlugin>
View Code

 

## ActiveMQ 通配符

  ( . )  用于作为路径上名字间的分割符

  ( > )  用于递归的匹配任何以这个名字开始的Destination

  ( * )  用于作为路径上任何名字

 

posted @ 2017-10-31 19:58  SPCop  阅读(223)  评论(0编辑  收藏  举报