Camel Restlet maxThreads 组件选项 [英] Camel Restlet maxThreads Component Option

查看:26
本文介绍了Camel Restlet maxThreads 组件选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题.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));

我在 url 中使用了 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>

这篇关于Camel Restlet maxThreads 组件选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆