骆驼Restlet maxThreads组件选项 [英] Camel Restlet maxThreads Component Option
问题描述
我有问题. apache camel文档指出,对于camel-restlet组件(从2.10版本开始),可以定义将为请求提供服务的最大线程数(http://camel.apache.org/restlet.html).
I have a problem. The apache camel documentation states that for the camel-restlet component (starting from 2.10 version) is possible to define the max number of threads that will service requests (http://camel.apache.org/restlet.html).
如何指定此参数? 这是我做的路线
How can i specify this parameter? This is the route that I made
from(
"restlet:http://localhost:" + config.getEmergencyRESTPort()
+ "?restletMethods=post,get&restletUriPatterns=#emergencyUriTemplates&maxThreads=64").process(
new EmergencyServerProcessor(config, emergencyService));
我在网址中使用了maxThreads参数,但是它不起作用.
I used the maxThreads parameter in the url but it doesn't work.
怎么了?
推荐答案
maxThreads不是URI选项,而是组件选项.
maxThreads is not a URI option but rather it is a component option.
您可以通过创建如下所示的bean来配置restlet组件:
You can configure your restlet component by creating a bean like this:
<bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent">
<property name="maxThreads" value="50"/>
</bean>
这篇关于骆驼Restlet maxThreads组件选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!