我有个问题。 apache Camel 文档指出,camel-restlet 组件(从 2.10 版本开始)可以定义服务请求的最大线程数(http://camel.apache.org/restlet.html)。
我该如何指定这个参数?
这是我制定的路线
from(
"restlet:http://localhost:" + config.getEmergencyRESTPort()
+ "?restletMethods=post,get&restletUriPatterns=#emergencyUriTemplates&maxThreads=64").process(
new EmergencyServerProcessor(config, emergencyService));
我在 url 中使用了 maxThreads 参数,但它不起作用。
错误是什么?
maxThreads 不是一个 URI 选项,而是一个组件选项。
您可以通过创建如下 bean 来配置 Restlet 组件:
<bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent">
<property name="maxThreads" value="50"/>
</bean>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)