Camel Restlet maxThreads Component Option

谁都会走 提交于 2019-12-11 02:59:52

问题


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));

I used the maxThreads parameter in the url but it doesn't work.

What is the error?


回答1:


maxThreads is not a URI option but rather it is a component option.

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>


来源:https://stackoverflow.com/questions/13358460/camel-restlet-maxthreads-component-option

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!