Spring Integration-5 :Routers
In this installment of our Spring Integration tutorial, we examine routers. Routers distribute messages to one or more message channels. Some routers (content routers) examine the message payload or headers in order to select a particular destination message channel. Other routers (recipient list routers) simply distribute the message to all listed message channels.

Example Content Router:
<int:payload-type-router input-channel="routingChannel"> <int:mapping type="java.lang.String" channel="stringChannel"/> <int:mapping type="java.lang.Integer" channel="integerChannel" /></int:payload-type-router>
Recipient List Router:
<int:recipient-list-router id="customRouter" input-channel="routingChannel"> <int:recipient channel="channel1" selector-expression ="payload.equals('foo')"/> <int:recipient channel="channel2" selector-expression="headers.containsKey('bar')"/> </int:recipient-list-router>