下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、understanding the threads allocated in activemq attachments:6 added by hiram chirino, last edited by rich petersen on dec 18, 2007 (view change) one of the easiest ways to tune an activemq deployment to increase scaleability is reduce the number of threads used to get the work done. the default acti
2、vemq configuration makes use of several threads to isolate producers from consumers. this prevents a producer from blocking when a consumer is misbehaving. the following diagram shows the threads involved in the typical process of sending a message from a producer application to a consumer applicati
3、on.activemq has several options that change the way threads are used and allocated. understanding these options and knowing how they can impact the system will help you know if they are safe to enable on your system to reduce the number of threads used and thereby increase scaleability.for example,
4、the default configuration of the vm transport allocates a transport thread which polls for messages from the transport and delivers them to the connection. the vm transport considers this async delivery of messages. since the vm transport connects to its transport peer within the same jvm, its possi
5、ble to use the calling transports thread to deliver the message to connection instead of using the polling thread. when the aysnc=false option is used, the threads in the system look like the following diagram.the broker uses a dispatch thread when sending messages to another connection. this isolat
6、es the producers application thread from any problems that may occur with the consumers connection. the dispatching of a message over transport can be a blocking operation if there are problems with the network connection or if the client is misbehaving. the broker avoids blocking the producers thre
7、ad even when the consumers connection is blocked by using this dispatch thread.the broker supports an option to avoid using the dispatch thread and instead have the producers transport thread directly send the message over the consumers transport. this option should only be used when either you dont
8、 mind blocking the producer when a consumer problem occurs or you know you wont have consumer problems. this option can be enabled per consumer by setting dispatchasync=false. the thread usage diagram for this option is shown below:if you look at the consumer jvm, you see at least 2 threads when you
9、 create a consumer that uses a messagelistener. the first thread is the transport thread which polls and delivers messages from the underlying network. the second thread is the session thread which delivers the message to the messagelistener and processed the message. by using a session thread, acti
10、vemq frees up the transport thread to continue to receive more messages from the network.activemq has an option that can disable the creation and use of the session thread. when the optimizeddispatch=true option is enabled, the transport thread deliver the message directly to the messagelistener for
11、 processing. i would only recommend that this be used for simple messagelisteners that do not send messages back into the jms system and which execute quickly. please note that if you have multiple sessions, the consumers in each session will be serviced by a single transport thread, which makes the system less concurrent. the thread usage diagram for this option is shown below:
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 單位管理制度呈現(xiàn)合集員工管理篇
- 單位管理制度呈現(xiàn)大合集人員管理篇
- 工作轉(zhuǎn)正自我鑒定4篇
- 3D打印在計算機維修中的創(chuàng)新應(yīng)用
- 《用色彩畫心情》課件
- 第3單元+中國特色社會主義道路
- 物流行業(yè)顧問工作總結(jié)
- 乒乓球比賽的作文匯編10篇
- 輸液室護(hù)士的職責(zé)概述
- 游樂園前臺服務(wù)感悟
- 2021年安全工程師《建筑施工安全》真題及答案解析
- 2024時事政治考試題庫附參考答案(黃金題型)
- 2024年新“國九條”及配套政策要點解讀分析報告
- 2024-2029年中國大健康行業(yè)市場發(fā)展現(xiàn)狀分析及發(fā)展趨勢與投資戰(zhàn)略規(guī)劃報告
- 超星爾雅學(xué)習(xí)通《藝術(shù)哲學(xué)美是如何誕生的(同濟大學(xué))》2024章節(jié)測試答案
- 全國醫(yī)院數(shù)量統(tǒng)計
- (2024年)長歌行漢樂府古詩PPT語文課件
- GB/T 43674-2024加氫站通用要求
- 倉庫班長年終總結(jié)及工作計劃
- 部編人教版二年級勞動教育上冊期末試卷(帶答案)
- 肛門手術(shù)的鎮(zhèn)痛研課件
評論
0/150
提交評論