![ActiveMQ 线程机制_第1页](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/46f00e3d-097b-4d10-a1f5-3e23b763780f/46f00e3d-097b-4d10-a1f5-3e23b763780f1.gif)
![ActiveMQ 线程机制_第2页](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/46f00e3d-097b-4d10-a1f5-3e23b763780f/46f00e3d-097b-4d10-a1f5-3e23b763780f2.gif)
![ActiveMQ 线程机制_第3页](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/46f00e3d-097b-4d10-a1f5-3e23b763780f/46f00e3d-097b-4d10-a1f5-3e23b763780f3.gif)
![ActiveMQ 线程机制_第4页](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/46f00e3d-097b-4d10-a1f5-3e23b763780f/46f00e3d-097b-4d10-a1f5-3e23b763780f4.gif)
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 1《白鹭》说课稿-2024-2025学年统编版语文五年级上册
- 2025技术咨询合同书
- 2025大连市住宅小区物业管理委托合同
- 2024年五年级品社下册《同是炎黄子孙》说课稿 山东版001
- 5《玲玲的画》说课稿-2024-2025学年语文二年级上册统编版
- 2023二年级数学下册 6 有余数的除法第5课时 解决问题(1)说课稿 新人教版
- 27我的伯父鲁迅先生(说课稿)-2024-2025学年六年级上册语文统编版001
- 2024-2025学年高中地理下学期第4周说课稿(世界的自然资源)
- 2023三年级数学上册 一 动物趣闻-克、千克、吨的认识 信息窗2吨的认识说课稿 青岛版六三制
- 芜湖厂房推拉棚施工方案
- 苏北四市(徐州、宿迁、淮安、连云港)2025届高三第一次调研考试(一模)生物试卷(含答案)
- 安全生产法律法规汇编(2025版)
- 监察部部长岗位职责
- 山西省太原市杏花岭区年三年级数学第一学期期末考试模拟试题含解析
- 断绝关系协议书范文参考(5篇)
- 量子力学课件1-2章-波函数-定态薛定谔方程
- 最新变态心理学课件
- 【自考练习题】石家庄学院概率论与数理统计真题汇总(附答案解析)
- 农村集体“三资”管理流程图
- 高中英语 牛津译林版必修第三册 Unit 2词汇全解
- (新版教材)粤教粤科版三年级下册科学全册教学课件PPT
评论
0/150
提交评论