下面是activemq.xml中的配置详解。

   
   
   
   
  1. <beans 
  2.   xmlns="http://www.springframework.org/schema/beans" 
  3.   xmlns:amq="http://activemq.apache.org/schema/core" 
  4.   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  5.   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
  6.   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> 
  7.  
  8.      
  9.     <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
  10.         <property name="locations"> 
  11.             <value>file:${activemq.base}/conf/credentials.propertiesvalue> 
  12.         property>       
  13.     bean> 
  14.  
  15.      
  16.      
  17.      
  18.      
  19.     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="testBroker" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" persistent="true"> 
  20.   
  21.                
  22.         <destinationPolicy> 
  23.             <policyMap> 
  24.               <policyEntries> 
  25.                
  26.                
  27.                
  28.                
  29.                
  30.                 <policyEntry topic=">" producerFlowControl="false" topicPrefetch="1000" useCache="true"> 
  31.                   <pendingSubscriberPolicy> 
  32.                     <vmCursor /> 
  33.                   pendingSubscriberPolicy> 
  34.                 policyEntry> 
  35.                  
  36.                  
  37.                  
  38.                  
  39.                  
  40.                 <policyEntry queue=">" producerFlowControl="true" memoryLimit="4mb" queuePrefetch="1000" useCache="true"> 
  41.                    
  42.         <managementContext> 
  43.             <managementContext connectorPort="62222" jmxDomainName="testDomain" createConnector="true"/> 
  44.         managementContext> 
  45.  
  46.          
  47.         <persistenceAdapter> 
  48.              
  49.              
  50.              
  51.             <kahaDB directory="${activemq.base}/data/kahadb" /> 
  52.         persistenceAdapter> 
  53.          
  54.          
  55.            
  56.            
  57.            
  58.           <systemUsage> 
  59.             <systemUsage sendFailIfNoSpaceAfterTimeout="1000"> 
  60.                 <memoryUsage> 
  61.                     <memoryUsage limit="32 mb"/> 
  62.                 memoryUsage> 
  63.                 <storeUsage> 
  64.                     <storeUsage limit="5 gb"/> 
  65.                 storeUsage> 
  66.                 <tempUsage> 
  67.                     <tempUsage limit="100 mb"/> 
  68.                 tempUsage> 
  69.             systemUsage> 
  70.         systemUsage> 
  71.          
  72.          
  73.          
  74.         <transportConnectors> 
  75.             <transportConnector name="manzuoopenwire" uri="tcp://0.0.0.0:63333"/> 
  76.         transportConnectors> 
  77.  
  78.          
  79.          
  80.     <import resource="jetty.xml"/> 
  81. beans> 

另外,有一个满座网关于amq的培训ppt,有需要的可以拿去~~