问题
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