ActiveMQ 5 入门

 apache-activemq-5.13.2

 

ActiveMQ使用JAAS授权的配置方式

<plugins>
     <!– 使用login.config配置授权用户 -->  
     <jaasAuthenticationPlugin configuration="activemq-domain" />
     <authorizationPlugin>
          <map>
              <authorizationMap>
                  <authorizationEntries>
                      <authorizationEntry queue=">" write="producers" read="consumers" admin="admins" />
                  </authorizationEntries>
              </authorizationMap>
          </map>
      </authorizationPlugin>
    </plugins>

ActiveMQ使用JAAS授权的配置方式

<plugins>
       <!– 使用简单授权方式-->  
       <simpleAuthenticationPlugin>
           <users>
                   <authenticationUser  username="admin"   password="pass"  groups="admins,publishers,consumers" />
           </users>
      </simpleAuthenticationPlugin>
     <authorizationPlugin>
          <map>
              <authorizationMap>
                  <authorizationEntries>
                      <authorizationEntry queue=">" write="producers" read="consumers" admin="admins" />
                  </authorizationEntries>
              </authorizationMap>
          </map>
      </authorizationPlugin>
    </plugins>

 

posted on 2016-05-11 15:15  nami  阅读(579)  评论(0编辑  收藏  举报