Question

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>
Était-ce utile?

La solution 2

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

Autres conseils

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).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top