Routing Slip - 6.3

Talend ESB Mediation Developer Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Design and Development
Talend ESB

The Routing Slip from the EIP patterns allows you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.



Default Value



Delimiter used if the Expression returned multiple endpoints.


If an endpoint uri could not be resolved, should it be ignored. Otherwise Camel will throw an exception stating the endpoint uri is not valid.


Camel 2.13.1/2.12.4: Allows to configure the cache size for the ProducerCache which caches producers for reuse in the routing slip. Will by default use the default cache size which is 1000. Setting the value to -1 allows to turn off the cache all together.


The following route will take any messages sent to the Apache ActiveMQ queue SomeQueue and pass them into the Routing Slip pattern.


Messages will be checked for the existance of the "aRoutingSlipHeader" header. The value of this header should be a comma-delimited list of endpoint URIs you wish the message to be routed to. The Message will be routed in a pipeline fashion (i.e. one after the other).

The Routing Slip will set a property ( Exchange.SLIP_ENDPOINT ) on the Exchange which contains the current endpoint as it advanced though the slip. This allows you to know how far we have processed in the slip.

The Routing Slip will compute the slip beforehand which means, the slip is only computed once. If you need to compute the slip on-the-fly then use the Dynamic Router pattern instead.

For further examples of this pattern in use see the Camel routing slip test cases.

Configuration options

Here we set the header name and the URI delimiter to something different.

Using the Fluent Builders

from("direct:c").routingSlip("aRoutingSlipHeader", "#");

Using the Spring XML Extensions

<camelContext id="buildRoutingSlip" 
    <from uri="direct:c"/>
    <routingSlip uriDelimiter="#">

Ignore invalid endpoints

The Routing Slip now supports ignoreInvalidEndpoints which the Recipient List also supports. You can use it to skip endpoints which are invalid.


And in Spring XML it is an attribute on the recipient list tag.

   <from uri="direct:a"/>
   <routingSlip ignoreInvalidEndpoints="true"/>

Then let's say the myHeader contains the following two endpoints direct:foo,xxx:bar. The first endpoint is valid and works. However the second is invalid and will just be ignored. Camel logs at INFO level about, so you can see why the endpoint was invalid.

Expression supporting

The Routing Slip now supports to take the expression parameter as the Recipient List does. You can tell Camel the expression that you want to use to get the routing slip.


And in Spring XML it is an attribute on the recipient list tag.

       <from uri="direct:a"/>
       <!--NOTE you need to specify the expression element
           inside of the routingSlip element -->
       <routingSlip ignoreInvalidEndpoints="true">