简体   繁体   English

Mule 1.3中的线程如何工作?

[英]How does threading work in Mule 1.3?

I have a tcp endpoint which send messages to a java component that calls a stored procedure in db and do some processing on the result and return it to the same tcp. 我有一个tcp端点,该端点将消息发送到Java组件,该组件在db中调用存储过程,并对结果进行一些处理,然后将其返回到同一tcp。 What I knew that every tcp request will be in it's own thread , but if the messages comes from the same connection does that mean i'll have only one thread , I need to configure mule to make the java component multi-threaded. 我知道每个tcp请求都将在它自己的线程中,但是如果消息来自同一连接,那意味着我将只有一个线程,我需要配置mule以使Java组件成为多线程。 The only thing I found is this : http://www.mulesoft.org/documentation/display/MULE3USER/Tuning+Performance#TuningPerformance-pooling and I can't understand it :D 我发现的唯一内容是: http : //www.mulesoft.org/documentation/display/MULE3USER/Tuning+Performance#TuningPerformance-pooling ,我听不懂:D

In Mule 3, whose doc you've linked in your question, message receivers (ie inbound endpoints) typically have a dedicated work manager with a pool of threads assigned to process requests in parallel (the exception is the JMS connector which acts a little different). 在问题中已链接了文档的Mule 3中,消息接收者(即入站端点)通常具有专用的工作管理器,该工作管理器具有分配给并行处理请求的线程池(JMS连接器的作用略有不同) )。

So in your case, the TCP inbound endpoint will have, by default, 16 threads assigned to deal with incoming requests that hits the single open TCP socket. 因此,在您的情况下,默认情况下,TCP入站端点将分配有16个线程来处理打入单个打开TCP套接字的传入请求。

No need to use pooled components. 无需使用池化组件。

EDIT: The question is about Mule 1.3, which is super old and has a very different threading model. 编辑:问题是关于Mule 1.3,它是非常老的并且具有非常不同的线程模型。 In that case, each endpoint has a different thread pool. 在这种情况下,每个端点都有一个不同的线程池。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM