Java camel-http4 2.22-toD不工作

Java camel-http4 2.22-toD不工作,java,apache-camel,Java,Apache Camel,在迁移到2.22.0(从2.16.5)之后,动态路由中的驼峰动态uri(toD)似乎已经停止工作。演示问题的测试路线: <route> <from uri="timer://foo?fixedRate=true&amp;period=1000"/> <setHeader headerName="SMSURI"> <constant>localhost:9090/</constant> &l

在迁移到2.22.0(从2.16.5)之后,动态路由中的驼峰动态uri(toD)似乎已经停止工作。演示问题的测试路线:

<route>
    <from uri="timer://foo?fixedRate=true&amp;period=1000"/>
    <setHeader headerName="SMSURI">
        <constant>localhost:9090/</constant>
    </setHeader>
    <toD uri="https4://${header.SMSURI}?throwExceptionOnFailure=false"/>
</route>
我知道动态uri有两种替代方法,一种是设置Exchange.HTTP_uri,然后使用静态路由“to”和任意url,另一种是使用ReceipItemList。但是,我不喜欢使用“to”的第一个选项,因为我需要设置任意url。我目前使用的是第二个选项ReceipEntList,类似这样的选项(请注意,这里的setHeader仅用于演示。url是在我的项目中的处理器类中动态检索和设置的):


本地主机:9090/
https4://${header.SMSURI}?throweExceptionOnFailure=false
这是有效的。然而,我真的很喜欢toD选项

此外,骆驼网站上还说:

动态-开箱即用

从骆驼2.16开始,有一个新的,这是一个动态的。 请参阅消息端点处的更多详细信息

有人能帮我了解一下http4是否已经删除了对toD的支持吗?还是这是一只虫子


PS:我使用blueprint xml在OSGI捆绑包内的Karaf 4.2容器中运行此程序。

确保您已将
camel-http4
依赖项升级到版本
2.22.0
。所有组件必须始终使用与驼峰核心相同的版本导入。是,所有组件都使用相同的版本。在Karaf中,一旦添加了特定版本的camel存储库,所有组件也将针对同一版本安装。这是一个全新的Karaf安装,没有Camel特性,然后我安装了2.22.0我们修复了2.22.0上的一个bug,该bug进入了2.22.1,关于toD中的问题。您可以使用recipientList作为解决方法。谢谢您,克劳斯!谢谢。目前正在使用recipientList。当2.22.1退出时,它将被删除。嗨,praveenp,我们有同样的问题。没有托德你是怎么解决的?
2018-08-11T14:41:07,770 | INFO  | Camel (testContext) thread #27 - timer://foo | route5                           | 160 - org.apache.camel.camel-core - 2.22.0 | java.lang.IllegalArgumentException: Cannot find endpoint with scheme https4
    at org.apache.camel.runtimecatalog.AbstractCamelCatalog.endpointProperties(AbstractCamelCatalog.java:529)
    at org.apache.camel.http.common.HttpSendDynamicAware.prepare(HttpSendDynamicAware.java:57)
    at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:118)
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
    at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
    at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
<route>
    <from uri="timer://foo?fixedRate=true&amp;period=1000"/>
    <setHeader headerName="SMSURI">
        <constant>localhost:9090/</constant>
    </setHeader>
    <recipientList>
        <simple>https4://${header.SMSURI}?throwExceptionOnFailure=false</simple>
    </recipientList>
</route>