【发布时间】:2014-01-05 03:06:48
【问题描述】:
我在 from("restlet:http/myLink") 子句中的骆驼路线中使用 restlet。当用户的请求超过每秒十个时,我开始收到错误处理请求,例如“org.restlet.engine.connector.Controller run 信息:检测到连接器过载。停止接受新工作”
我认为,该错误是由线程数、请求查询的大小或数量或类似原因引起的。我尝试在 spring config 中设置为 maxThreads 参数不同的值
<bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent">
<property name="maxThreads" value="15"/>
</bean>
但我没有成功。在文档http://camel.apache.org/restlet.html 中,我找不到用于设置请求队列大小\数量的 ant 参数。我需要帮助:(
附: camel-restlet 版本是 2.12.2
更新
我尝试将大数字设置为 maxThreads,maxConnectionsPerHost,maxTotalConnections,但它没有用。如果像这样将 org.restlet.Component 注入骆驼的配置:
<bean id="restletComponent" class="org.restlet.Component" />
<bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent">
<constructor-arg index="0">
<ref bean="restletComponent" />
</constructor-arg>
<property name="maxThreads" value="255"/>
<property name="maxConnectionsPerHost" value="1000"/>
<property name="maxTotalConnections" value="1000" />
</bean>
如何覆盖使用 BaseHelper 参数的属性?
【问题讨论】:
标签: threadpool apache-camel restlet-2.0