Friday, October 23, 2009

Spring Integration Router Configuration

Just came across a router config in which based on the header it will route the messages to respective channels-provided both header and channel

l have same names .(No static definition required in application xmls)


1. Configuration where mapping of header values to channels is required

<header-value-router input-channel="routingChannel" header-name="testHeader">

<mapping value="someHeaderValue" channel="channelA" />

<mapping value="someOtherHeaderValue" channel="channelB" />

</header-value-router>


2. Configuration where mapping of header values is not required if header values themselves represent the channel names

<header-value-router input-channel="routingChannel" header-name="testHeader"/>

No comments:

 
Free Domain Names @ .co.nr!