The <chain> element provides an 'input-channel' attribute, and if the last element in the chain is capable of producing reply messages, it may optionally provide an 'output-channel' attribute. The sub-elements are then filters, transformers, splitters, and service-activators. The last element may be a router.
<chain input-channel="input" output-channel="output"> <filter ref="someSelector" throw-exception-on-rejection="true"/> <header-enricher error-channel="customErrorChannel"> <header name="foo" value="bar"/> </header-enricher> <service-activator ref="someService" method="someMethod"/> </chain>