Mule线程配置文件的poolExhaustedAction-RUN [英] Mule Threading Profile's poolExhaustedAction - RUN

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

问题描述

我已经经历过了

  • http://www.mulesoft.org/documentation/display/34X/Tuning+Performance#TuningPerformance-ThreadingProfileConfigurationReference
  • Mule poolExhaustedAction

我对RUN poolExhaustedAction感到困惑.

I have some confusion around RUN poolExhaustedAction.

如果poolExhaustedAction设置为RUN,并且池中没有可用线程,则请求接收者线程会继续进行流处理吗?如果是这样,这是同步处理吗?

If poolExhaustedAction is set to RUN and there are no threads available in the pool, will the request receiver thread continue with flow? If so, is this a Synchronous processing?

编辑:假设我有一个m子流配置,例如:

Suppose I have a mule flow configuration like:

  • 流处理策略是异步的.
  • ReceiverFlowDispatcher的线程池大小为1.
  • 最后,ReceiverDispatcherpoolExhaustedActionRUN.

  • Flow processing strategy is asynchronous.
  • The thread pool sizes of Receiver, Flow and Dispatcher is 1.
  • Finally the poolExhaustedAction of Receiver and Dispatcher is RUN.

使用上面提到的配置,我的问题如下,假设Flow线程池已用尽,并且来自Receiver池的(仅一个)线程接收到来自客户端的新请求.该接收器线程将继续执行流处理还是等待?如果我正确理解它,则接收器线程不会等待,因为其poolExhaustedAction设置为RUN.因此,这不是从接收器线程的角度进行的同步处理吗?那么设置asynchronous处理策略的用途是什么?

With the above mentioned configuration, my question follows like, imagine Flow thread pool is exhausted and a new request from client is received by the (only one) thread from Receiver pool. Will this receiver thread continue the flow processing or wait? If I understood it correctly, the receiver thread doesn't wait, as its poolExhaustedAction is set to RUN. So isn't this a Synchronous processing form the perspective of receiver thread? Then what is the use of setting asynchronous processing strategy?

现在,我更改了上面的配置,以将Dispatcher's poolExhaustedAction设置为WAIT.上面的接收器线程会等待调度程序线程吗?我不这么认为.

Now I have changed the above configuration such that Dispatcher's poolExhaustedAction is set to WAIT. Will the above receiver thread wait for dispatcher thread? I don't think so.

请澄清我的疑问.预先感谢.

Please clarify my doubt. Thanks in advance.

推荐答案

请参阅以下链接,其中我已经解释了WAIT和RUN poolExhaustedAction值.

Refer to the following link where I have explained the WAIT and RUN poolExhaustedAction values.

M子精疲力尽的行动RUN vs WAIT.选择哪个以及何时选择

对于与RUN相关的问题.

For your question related to RUN.

对于异步处理策略,是.当流线程耗尽时,请求接收器线程继续进行请求的处理.但这不是同步的.因为如果有4个接收器线程,则所有4个接收器线程可能会继续处理请求.而且它们都可能并行运行.

In case of asynchronous processing streategy, Yes. When the flow threads are exhausted the request receiver thread continues with the processing of the request. But this is not synchronous. Because if there are 4 receiver threads all 4 receiver thread might continue processing of the request. And they all might be running parallely.

已编辑OP的答案: 因为只有一个线程正在执行处理,但这并不意味着同步.如前所述,Receiver线程仅在流线程池用完之后才启动.意味着流线程都忙于处理,在这种情况下,一个线程仍在处理中,无法接受新的处理请求.因此,接收器线程开始处理.因此,这仍然不是同步的.

Answer for the Edited OP: Because only one thread is executing the processing doesn't mean synchronous. As mentioned earlier Receiver thread only starts after the flow thread pool is exhausted. Means that the flow threads are all busy in processing, in this case the one thread is still processing and cannot take a new request for processing. So the receiver thread started processing. So this is still not synchronous.

希望这能回答您的问题.

Hope this answers your questions.

这篇关于Mule线程配置文件的poolExhaustedAction-RUN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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