Mule ESB和最大流线程

Mule ESB和最大流线程,mule,esb,Mule,Esb,我访问了以下站点: http://www.mulesoft.org/documentation/display/current/Tuning+Performance 它说要改变以下两个值: maxThreadsActive and maxBufferSize MaxThreadsActivity是任何时间的活动线程数,maxBufferSize是队列中可以等待的请求数 但是我很难在代码中找到任何这样做的例子 --是否有一个中央Mule ESB文件,我可以在其中更改maxThreadsActi

我访问了以下站点:

http://www.mulesoft.org/documentation/display/current/Tuning+Performance
它说要改变以下两个值:

maxThreadsActive and maxBufferSize
MaxThreadsActivity是任何时间的活动线程数,maxBufferSize是队列中可以等待的请求数

但是我很难在代码中找到任何这样做的例子

--是否有一个中央Mule ESB文件,我可以在其中更改maxThreadsActive和maxBufferSize的默认数量

这将是dispatcher线程配置文件。那是什么文件? -- 如果没有中心文件,对于同步进程,我如何更改以下代码,使活动线程的最大数量为100,队列上的请求的最大数量为60

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd">
    <db:generic-config name="Generic_Database_Configuration" url="jdbc:db2://localhost:50000/TEST:user=instuid;password=instpw;" driverClassName="com.ibm.db2.jcc.DB2Driver" doc:name="Generic Database Configuration"/>
    <http:endpoint exchange-pattern="request-response" host="localhost" port="8081" method="POST" name="HTTP" doc:name="HTTP"/>
    <flow name="test1Flow1" doc:name="test1Flow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP" contentType="application/json" keepAlive="true"  mimeType="application/json"/>
        <echo-component doc:name="Echo"/>
    </flow>
</mule>


谢谢

您可以在流中使用排队异步处理策略。通过这种方法,您可以更改流可用的线程数

例如:

<queued-thread-per-processor-processing-strategy name="ProcessingStrategy" maxThreads="60" minThreads="10" threadTTL="5000" poolExhaustedAction="WAIT" threadWaitTimeout="5000" maxBufferSize="100"/>

<flow name="test1Flow1" doc:name="test1Flow1" processingStrategy="ProcessingStrategy">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP" contentType="application/json" keepAlive="true"  mimeType="application/json"/>
    <echo-component doc:name="Echo"/>
</flow>

“您可以为每个接收方线程池、流线程池和调度程序线程池指定单独的线程配置文件”。例如:

<http:connector name="DefaultHTTPConnector" clientSoTimeout="120000"  keepSendSocketOpen="false" >
    <receiver-threading-profile maxThreadsActive="500"/>
    <dispatcher-threading-profile maxThreadsActive="500"/>
</http:connector>


我推荐流程中的第一个选项。
我希望能帮忙

可以在流中使用排队异步处理策略。通过这种方法,您可以更改流可用的线程数

例如:

<queued-thread-per-processor-processing-strategy name="ProcessingStrategy" maxThreads="60" minThreads="10" threadTTL="5000" poolExhaustedAction="WAIT" threadWaitTimeout="5000" maxBufferSize="100"/>

<flow name="test1Flow1" doc:name="test1Flow1" processingStrategy="ProcessingStrategy">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP" contentType="application/json" keepAlive="true"  mimeType="application/json"/>
    <echo-component doc:name="Echo"/>
</flow>

“您可以为每个接收方线程池、流线程池和调度程序线程池指定单独的线程配置文件”。例如:

<http:connector name="DefaultHTTPConnector" clientSoTimeout="120000"  keepSendSocketOpen="false" >
    <receiver-threading-profile maxThreadsActive="500"/>
    <dispatcher-threading-profile maxThreadsActive="500"/>
</http:connector>


我推荐流程中的第一个选项。
我希望能帮忙

不能在请求-响应交换模式上添加流处理策略

不能在请求-响应交换模式上添加流处理策略

添加全局配置元素,如下所示:


添加一个全局配置元素,如下所示: