By default Camel route follows the inout exchange pattern. So i am not sure who will consume the output of incomingOrders in below example?

<route id="FileToJMS">
  <from uri="file:target/placeorder" />
  <to uri="jms:incomingOrders" />
</route>
有帮助吗?

解决方案 2

Because the <to.. is the last endpoint of the route the output will be ignored as the route will be over.

其他提示

The default exchange pattern (derived from WSDL spec https://www.w3.org/TR/2004/WD-wsdl20-patterns-20040326/#patterns) depends on the camel component of the destination endpoint. The InOnly exchange pattern is the default for SEDA, JMS and File components (http://camel.apache.org/event-message.html), while the InOut is semantically the default for Direct component.

In the presented example, the InOnly exchange pattern is used, so the file endpoint consumer will enqueue the message into a JMS queue and proceed. If the InOut exchange pattern was used, the producer would block until a reply message would be returned and proceed with the returned message (http://camel.apache.org/request-reply.html). This would make sense if you wanted to finish with the processing of one file, before you fetch the next one (depending on the options defined in the file component endpoint consumer).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top