我正在尝试使用 Spring DSL 进行一些路由。我无法将消息发送到目的地。我知道我遗漏了一些东西,请帮助我找出问题所在。我在 deviceMessageRouteIdentifier 中设置了标题,如下所示
Message outMsg = exchange.getOut();
outMsg.setHeader("device_template_id","11");
outMsg.setHeader("view_id", "2");
我的骆驼路线在这里
<camel:route>
<camel:from uri="direct:devicemessageprocessor"/>
<camel:bean ref="deviceMessageRouteIdentifier"/>
<camel:to uri="seda:deviceRouting"/>
</camel:route>
<camel:route>
<camel:from
uri="seda:deviceRouting?concurrentConsumers=10&blockWhenFull=true&purgeWhenStopping=true" />
<choice>
<when>
<header>$device_template_id = '11'</header>
<to uri="direct:gen2Bridge" />
</when>
<when>
<header>$view_id = '1'</header>
<to uri="direct:prediction" />
</when>
</choice>
</camel:route>
<camel:route>
<camel:from uri="direct:gen2Bridge"/>
<camel:bean ref="gen2BridgeProcessor" />
</camel:route>
我能够到达 deviceMessageRouteIdentifier 但无法到达目的地 gen2BridgeProcessor
提前致谢