我试图了解如何使用3.5 CE
微调Mule中的线程配置文件初级流瑜伽
从FTP端点获取文件并将其汇集到VM队列中。
流程2
在启用事务的情况下从上述VM队列中读取并执行一些业务逻辑处理。
我假设Flow 2将基于VM连接器线程配置在多个线程中执行。但我注意到第二个流程总是使用4个线程来并行执行它。尝试配置默认线程配置文件,它也没有任何区别。请让我知道我错过了什么。任何帮助表示赞赏
示例VM连接器配置
<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
答案 0 :(得分:4)
从Mule jar调试源代码后,我发现我还需要设置轮询VM队列的消费者数量。
我通过将vm:connector上的numberOfConcurrentTransactedReceivers设置为更高的数字来实现此功能。默认值为4,这就是我只看到4个并行线程的原因。
现在工作正常。希望这对某人有用
<vm:connector name="ITS_VM" validateConnections="true" createMultipleTransactedReceivers="true" numberOfConcurrentTransactedReceivers="30"
&gt;
可在此处找到相关帖子 http://ricston.com/blog/mule-jms-consumers-max-threads-active/
答案 1 :(得分:0)
查看文档中的this页面,您会发现:
Mule ESB应用程序是一组流程的协作。 从概念上讲,消息由流程分三个阶段处理:
- 入站连接器收到的邮件
- 正在处理的邮件
- 通过出站连接器发送的邮件
醇>
然后:
调整Mule的性能涉及分析和改进这些 每个流程分三个阶段。您可以从应用相同的调整开始 接近所有流程,然后进一步定制每个流程的调整 根据需要流动。
您可以阅读计算主题部分,了解如何理解您的需求。
问候。