【发布时间】:2017-11-08 22:01:41
【问题描述】:
我正在使用 Apache camel 和 jboss fuse,我创建了下面列出的示例路由蓝图,我已经成功处理了所有路由中的异常,现在问题是我找不到任何路由节流示例定义。在 apache camel 文档中,他们给出了简单的 DSL 节流,在 stackoverflow 中我发现 rabbitMq throttling 这不是我的情况。如何在 apache camel 中限制这样的路由
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<cxf:rsServer address="/testservice" id="testserver" serviceClass="com.company.HelloBean">
<camelContext id="testContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
<route id="testRoute" >
<throttle timePeriodMillis="10000">
<constant>3</constant>
<from id="_from1" uri="cxfrs:bean:testserver"/>
<bean beanType="com.company.HelloBean"
id="_bean1" method="hello"/>
</throttle>
</route>
</camelContext>
</blueprint>
在 jboss fuse 中部署应用程序时会出错。找不到服务
【问题讨论】:
-
你没有限制 bean。你限制了路线
标签: java apache-camel throttling