...
Code Block |
---|
<camelContext id="buildRoutingSlip" xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="direct:c"/> <routingSlip headerName="aRoutingSlipHeader" uriDelimiter="#"/> </route> </camelContext> |
Ignore invalid endpoints
Available as of Camel 2.3
The Routing Slip now supports ignoreInvalidEndpoints
which the Recipient List also supports. You can use it to skip endpoints which is invalid.
Code Block |
---|
from("direct:a").routingSlip(header("myHeader")).ignoreInvalidEndpoints();
|
And in Spring XML its an attribute on the recipient list tag.
Code Block |
---|
<route>
<from uri="direct:a"/>
<routingSlip ignoreInvalidEndpoints="true">
<header>myHeader</header>
</routingSlip>
</route>
|
Then lets say the myHeader
contains the following two endpoints direct:foo,xxx:bar
. The first endpoint is valid and works. However the 2nd is invalid and will just be ignored. Camel logs at INFO level about, so you can see why the endpoint was invalid.
Further Examples
For further examples of this pattern in use you could look at the routing slip test cases.
...