骡子VM队列线程配置 [英] Mule VM Queue thread configuration

查看:15
本文介绍了骡子VM队列线程配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解如何使用3.5 CE微调Mule中的线程配置文件

flow 1

从FTP终结点提取文件并将其池化为VM队列。

流程2

在启用事务的情况下读取上述VM队列,并执行一些业务逻辑处理。


我假设流2将基于VM连接器线程配置在多个线程中执行。但是我注意到第二个流总是使用4个线程来并行执行它。我已经尝试配置默认线程配置文件,但也没有任何不同。请告诉我我错过了什么。感谢任何帮助

虚拟机连接器配置示例

  <vm:connector name="ITS_VM" validateConnections="true"   >
    <receiver-threading-profile  maxThreadsIdle="30" maxBufferSize="5000" maxThreadsActive="40"/>
    <dispatcher-threading-profile maxThreadsIdle="30" maxBufferSize="5000" maxThreadsActive="40"/>
     <vm:queue-profile  maxOutstandingMessages="500">
         </vm:queue-profile>
    </vm:connector>

示例默认配置

<configuration >
    <default-threading-profile  maxThreadsIdle="30" maxBufferSize="5000" maxThreadsActive="40" />
    <default-dispatcher-threading-profile maxThreadsIdle="30" maxBufferSize="5000" maxThreadsActive="40"/>
    <default-receiver-threading-profile maxThreadsIdle="30" maxBufferSize="5000" maxThreadsActive="40" />
        </configuration>

*控制台日志*

15:26:13,728 [FetchFiles_Flow.stage1.02] INFO Queued 1 file
15:26:13,797 [ITS_VM.receiver.02] INFO ---------------------------Processing 1 file
15:26:14,114 [FetchFiles_Flow.stage1.03] INFO Queued 1 file
15:26:14,146 [ITS_VM.receiver.03] INFO ---------------------------Processing 1 file
15:26:14,512 [FetchFiles_Flow.stage1.04] INFO Queued 1 file
15:26:14,547 [ITS_VM.receiver.04] INFO--------------------------- Processing 1 file
15:26:14,947 [FetchFiles_Flow.stage1.05] INFO Queued 1 file
15:26:15,000 [ITS_VM.receiver.01] INFO--------------------------- Processing 1 file
15:26:15,349 [FetchFiles_Flow.stage1.06] INFO Queued 1 file
15:26:15,740 [FetchFiles_Flow.stage1.07] INFO Queued 1 file
15:26:16,122 [FetchFiles_Flow.stage1.08] INFO Queued 1 file
15:26:16,510 [FetchFiles_Flow.stage1.09] INFO Queued 1 file
15:26:16,892 [FetchFiles_Flow.stage1.10] INFO Queued 1 file
15:26:17,272 [FetchFiles_Flow.stage1.11] INFO Queued 1 file
15:26:17,646 [FetchFiles_Flow.stage1.12] INFO Queued 1 file
15:26:18,017 [FetchFiles_Flow.stage1.13] INFO Queued 1 file

推荐答案

调试Mule Jars的源代码后,我想我还需要设置轮询VM队列的使用者数量。

我通过将vm:connector上的number OfConcurrentTransactedReceivers设置为更高的数字来实现此功能。默认值为4,这就是我仅看到4个并行线程的原因。

它现在工作得很好。希望这对某些人有帮助

<vm:connector name="ITS_VM" validateConnections="true" createMultipleTransactedReceivers="true" numberOfConcurrentTransactedReceivers="30">

相关帖子可在此处找到 http://ricston.com/blog/mule-jms-consumers-max-threads-active/

这篇关于骡子VM队列线程配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆