10.4 Configuring a Splitter using XML

A splitter can be configured through XML as follows:

<channel id="inputChannel"/>

<splitter id="splitter" 1
  ref="splitterBean" 2
  method="split" 3
  input-channel="inputChannel" 4
  output-channel="outputChannel" 5/>

<channel id="outputChannel"/>

<beans:bean id="splitterBean" class="sample.PojoSplitter"/>

1

The id of the splitter is optional.

2

A reference to a bean defined in the application context. The bean must implement the splitting logic as described in the section above. Required.

3

The method (defined on the bean specified above) that implements the splitting logic. Optional.

4

The input channel of the splitter. Required.

5

The channel where the splitter will send the results of splitting the incoming message. Optional (because incoming messages can specify a reply channel themselves).