You can either put a router as described above at each point where you want to allow the detour and reconfigure the appropriate one.
Another alternative would be to unsubscribe the appropriate endpoint that you want to detour. Something like this
Then, in the application that imports this file, send a <control-bus /> message to the transformer you want to detour.
<si:transformer id="one" input-channel='input' output-channel='channel.a'/>
<si:transformer id="two" input-channel='channel.a' output-channel='channel.b'/>
<si:transformer id="three" input-channel='channel.b' output-channel='channel.c'/>
<si:transformer id="four" input-channel='channel.c' output-channel='channel.d'/>
<si:transformer id="five" input-channel='channel.d' output-channel='output'/>
This will unsubscribe "three" from "channel.b".
Then, subscribe your own consumer to "channel.b".
For this to work, you would probably want to configure your initial inbound adapter to auto-startup="false", and start it (with another control bus message) after the reconfiguration has completed,
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware