简体   繁体   中英

Can we pass a message directly from seda:queue to direct:endpoint in camel?

Using below configuration:

<camel:camelContext>
<camel:template id="camelProcessTemplate" />
    <camel:endpoint id="asyncEndpoint" uri="seda:asyncQueue" />
    <camel:endpoint id="calcWeightEndpoint" uri="direct:calculateWeightIn" />

 <camel:route id="route1">
  <camel:from ref="..." />
  <camel:to ref="asyncEndpoint" />
 </camel:route>

 <camel:route id="route2">
  <camel:from ref="asyncEndpoint" />
  <camel:to ref="calcWeightEndpoint" />
 </camel:route>

<camel:route id="route3">
 <camel:from ref="calcWeightEndpoint" />
 <camel:process ref="..." />
 <camel:to ref="..." />
</camel:route>

</camel:camelContext>

The message is entering into route2 but is not getting passed to route3.

You should use the uri attributes instead of the ref attributes in your from s and to s:

<camel:to uri="direct:calculateWeightIn" />

Also, it's possible that your processor in route3 is failing and not logging properly. Maybe add a <camel:log /> step between the from and the process .


EDIT 1: OP updated the question to correct their code block.

Could you please add a <camel:log /> between the from and the process , to verify whether the message is arriving in route3 ? The problem may be in your processor, as I said above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM