国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
activemq配置詳解
  • <beans 
  •   xmlns="http://www.springframework.org/schema/beans" 
  •   xmlns:amq="http://activemq.apache.org/schema/core" 
  •   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  •   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
  •   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> 
  •  
  •     <!-- Allows us to use system properties as variables in this configuration file --> 
  •     <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
  •         <property name="locations"> 
  •             <value>file:${activemq.base}/conf/credentials.properties</value> 
  •         </property>       
  •     </bean> 
  •  
  •     <!-- The <broker> element is used to configure the ActiveMQ broker. --> 
  •      
  •     <!-- brokerName:必須定義一個名稱 --> 
  •     <!-- 不使用持久化存儲:persistent="false",注意:內(nèi)存要足夠大 --> 
  •     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="testBroker" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" persistent="true"> 
  •   
  •                
  •         <destinationPolicy> 
  •             <policyMap> 
  •               <policyEntries> 
  •               <!-- 如果設(shè)定了<systemUsage>,則全局按照<systemUsage>,這里精細控制每一個q --> 
  •               <!-- 設(shè)定了flowcontrol以后,會根據(jù)memorylimit的緩沖區(qū)設(shè)定的大小,決定producer的流速,即:可能拖慢producer --> 
  •               <!-- 設(shè)定flowcontrol false后(同時不設(shè)定systemUsage),雖然不會拖慢producer,但是可能會占用大量activemq的內(nèi)存,如果處理仍然不及時,可能最終導致amq outofmemory --> 
  •               <!-- 參考下面<systemUsage>的說明 --> 
  •               <!-- 設(shè)定了false以后,表示producer直接都給,直到撐死systemUsage,才報客戶端Exception --> 
  •                 <policyEntry topic=">" producerFlowControl="false" topicPrefetch="1000" useCache="true"> 
  •                   <pendingSubscriberPolicy> 
  •                     <vmCursor /> 
  •                   </pendingSubscriberPolicy> 
  •                 </policyEntry> 
  •                  
  •                 <!-- 設(shè)定true,表示超過memoryLimit以后,就等,等到systemUsage設(shè)定的超時時間報Exception --> 
  •                 <!-- 盡管可以讓systemUsage統(tǒng)一管理全部的,但也就失去了精細管理每一個隊列的能力,如果隊列有重要和不重要之分,即:有的允許丟數(shù)據(jù)的,就設(shè)定true和memoryLimit;有的不允許的,就單獨設(shè)定 --> 
  •                 <!-- 關(guān)于amq的特殊檢測參數(shù)也在這里設(shè)定,參見http://activemq.apache.org/advisory-message.html --> 
  •                 <!-- queuePrefetch:一次分配給consumer多少數(shù)量的消息 --> 
  •                 <policyEntry queue=">" producerFlowControl="true" memoryLimit="4mb" queuePrefetch="1000" useCache="true"> 
  •                   <!-- Use VM cursor for better latency 
  •                        For more information, see: 
  •                         
  •                        http://activemq.apache.org/message-cursors.html 
  •                         
  •                   <pendingQueuePolicy> 
  •                     <vmQueueCursor/> 
  •                   </pendingQueuePolicy> 
  •                   --> 
  •                 </policyEntry> 
  •               </policyEntries> 
  •             </policyMap> 
  •         </destinationPolicy>  
  •   
  •          
  •         <!-- 設(shè)定jmx管理端口 --> 
  •         <managementContext> 
  •             <managementContext connectorPort="62222" jmxDomainName="testDomain" createConnector="true"/> 
  •         </managementContext> 
  •  
  •         <!-- 設(shè)定持久化方案 --> 
  •         <persistenceAdapter> 
  •             <!-- 穩(wěn)定性最強的一個 --> 
  •             <!-- <amqPersistenceAdapter useNIO="true" directory="target/Broker2-data/activemq-data" syncOnWrite="true" indexPageSize="16kb" persistentIndex="true" indexMaxBinSize="100" maxFileLength="10mb" maxCheckpointMessageAddSize="32kb" cleanupInterval="3000" checkpointInterval="20000" /> --> 
  •             <!-- 對于恢復來說,這個存儲不能保證完全不丟數(shù)據(jù)。它比一般存儲的快50% --> 
  •             <kahaDB directory="${activemq.base}/data/kahadb" /> 
  •         </persistenceAdapter> 
  •          
  •          
  •           <!-- System Usage 對整個的broker做全局設(shè)定--> 
  •           <!-- 使用systemUsage,以后,如果參數(shù)值設(shè)定不當,可能導致整個的q停止相應(yīng) --> 
  •           <!-- 好的辦法是:設(shè)定systemUsage,同時設(shè)定sendFailIfNoSpaceAfterTimeout(多長時間后超時),這個超時信息會返回給producer。這樣即不會讓amq被撐死,有能夠保證producer不被拖死 --> 
  •           <systemUsage> 
  •             <systemUsage sendFailIfNoSpaceAfterTimeout="1000"> 
  •                 <memoryUsage> 
  •                     <memoryUsage limit="32 mb"/> 
  •                 </memoryUsage> 
  •                 <storeUsage> 
  •                     <storeUsage limit="5 gb"/> 
  •                 </storeUsage> 
  •                 <tempUsage> 
  •                     <tempUsage limit="100 mb"/> 
  •                 </tempUsage> 
  •             </systemUsage> 
  •         </systemUsage> 
  •          
  •         <!-- 定義連接方式,注意如果只監(jiān)聽內(nèi)網(wǎng)ip,需要指定IP地址 --> 
  •         <!-- 可以指定熱備等,使用failover --> 
  •         <transportConnectors> 
  •             <transportConnector name="manzuoopenwire" uri="tcp://0.0.0.0:63333"/> 
  •         </transportConnectors> 
  •  
  •         <!-- 對于broker,可以設(shè)定認證 --> 
  •         <!-- 
  •         <plugins> 
  •             <simpleAuthenticationPlugin> 
  •                 <users> 
  •                     <authenticationUser username="admin" password="password" groups="admins,publishers,consumers"/> 
  •                     <authenticationUser username="publisher" password="password" groups="publishers,consumers"/> 
  •                     <authenticationUser username="consumer" password="password" groups="consumers"/> 
  •                     <authenticationUser username="guest" password="password" groups="guests"/> 
  •                 </users> 
  •             </simpleAuthenticationPlugin> 
  •         </plugins> 
  •         --> 
  •     </broker> 
  •      
  •      
  •     <!-- 可以設(shè)定web 管理界面 --> 
  •     <import resource="jetty.xml"/> 
  • </beans> 
  • 本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
    打開APP,閱讀全文并永久保存 查看更多類似文章
    猜你喜歡
    類似文章
    ActiveMQ的activemq.xml詳細配置講解
    zookeeper+activemq配置消息中間件集群 服務(wù)器配置
    spring整合activeMq 調(diào)試JMS<一> - 自娛自樂 - 51CTO技術(shù)博客
    JMS--ActiveMQ的簡單使用
    xml、schema、xsd
    如何配置spring與activeMQ持久性消息存儲數(shù)據(jù)庫? (Spring Framework|邏輯層) - [Matrix - 與 Java 共舞]
    更多類似文章 >>
    生活服務(wù)
    分享 收藏 導長圖 關(guān)注 下載文章
    綁定賬號成功
    后續(xù)可登錄賬號暢享VIP特權(quán)!
    如果VIP功能使用有故障,
    可點擊這里聯(lián)系客服!

    聯(lián)系客服