Apache camel 驼峰休息至控制总线

Apache camel 驼峰休息至控制总线,apache-camel,Apache Camel,我正在公开一个REST端点以控制驼峰路由: <get uri="/camel/route/{id}" produces="text/plain"> <description>stop a camel route by its ID</description> <param name="id" type="path" description="Route ID" dataType="string"/> <param na

我正在公开一个REST端点以控制驼峰路由:

<get uri="/camel/route/{id}" produces="text/plain">
    <description>stop a camel route by its ID</description>
    <param name="id" type="path" description="Route ID" dataType="string"/>
    <param name="action" type="query" description="Action to take" dataType="string"/>
    <responseMessage message="OK" code="200" />
    <to uri="controlbus:route?routeId=${header.id}&amp;action=${header.action}"/>
</get>

如何解析路由中的REST路径和查询参数?

诸如
${header.action}
之类的表达式不会在
处理器中计算。如果您使用的是最新版本的Camel,请改用
。如果您的版本中没有此功能,
可以执行此操作

ControlBusProducer - ControlBus task done [${header.action} route ${header.id}] with result -> void