Camel Restlet maxThreads Component Option

2019-07-11 02: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条回答
干净又极端
2楼-- · 2019-07-11 03:31

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>
查看更多
登录 后发表回答