Apache camel 骆驼网中的最大尺寸
我一直在使用camel-netty和camel-netty-http组件,试图弄清楚设置maximumPoolSize的作用 然而,根据我在此基础上观察到的情况,OrderPool总是处理16个并发请求。我正在尝试将maximumPoolSize更改为值5,如下所示Apache camel 骆驼网中的最大尺寸,apache-camel,netty,apache-karaf,Apache Camel,Netty,Apache Karaf,我一直在使用camel-netty和camel-netty-http组件,试图弄清楚设置maximumPoolSize的作用 然而,根据我在此基础上观察到的情况,OrderPool总是处理16个并发请求。我正在尝试将maximumPoolSize更改为值5,如下所示 <bean id="nettyBean" class="com.redhat.NettyTestImpl"> <property name="message" value="Netty maximu
<bean id="nettyBean" class="com.redhat.NettyTestImpl">
<property name="message" value="Netty maximumPoolSize test"/>
</bean>
<camelContext trace="false" xmlns="http://camel.apache.org/schema/blueprint" autoStartup="true">
<route>
<from uri="netty-http:http://localhost:8080/hello?maximumPoolSize=5&sync=true"/>
<log message="Forwarding to Netty component ....."/>
<setBody>
<method ref="nettyBean" method="sayHi"/>
</setBody>
<delay>
<constant>3000</constant>
</delay>
<log message="The body contains : ${body}"/>
</route>
</camelContext>
但似乎无法将maximumPoolSize设置为值。那么,我做错了什么?如何获取maximumPoolSize集
我通过对20个并发请求进行负载测试来检查这一点,所有请求都得到了处理 我刚刚检查了camel-netty和camel-netty-http的代码,maximumPoolSize用于OrderPool,您可以使用jconsoler检查线程池大小。 由于OrderPool用于处理camel的处理器,netty仍然有工作线程来处理连接,这意味着它这次仍然可以处理20个并发请求。但TPS可能只有5%左右