Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
DetourThe Detour from the EIP patterns allows you to send messages through additional steps if a control condition is met. It can be useful for turning on extra validation, testing, debugging code when needed.
ExampleIn this example we essentially have a route like Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Using the Spring XML Extensions <route> <from uri="direct:start"/> <choice> <when> <method bean="controlBean" method="isDetour"/> <to uri="mock:detour"/> </when> </choice> <to uri="mock:result"/> </route> whether the detour is turned on or off is decided by the For full details, check the example source here: camel-core/src/test/java/org/apache/camel/processor/DetourTest.java Using This PatternIf you would like to use this EIP Pattern then please read the Getting Started, you may also find the Architecture useful particularly the description of Endpoint and URIs. Then you could try out some of the Examples first before trying this pattern out. |