# cSplitter

Splits a message into several sub-messages so that they can be handled and treated differently in individual routes.

For more information, see the Apache camel documentation https://camel.apache.org/components/latest/.

## cSplitter Standard properties

These properties are used to configure cSplitter running in the Standard Job framework.

The Standard cSplitter component belongs to the Routing family.

## Basic settings

| Properties | Description |
| --- | --- |
| Language | Select the language of the expression you want to use to split your messages,<br>from None, Constant, EL, Groovy, Header, JoSQL, JSonPath, JXPath, MVEL, OGNL, PHP,<br>Property, Python, Ruby, Simple, SpEL,<br>SQL, XPath, and XQuery.<br><br>For more information about how to use the languages to create an expression, see<br>the site http://camel.apache.org/languages.html. |
| Correlation expression/Expression | Type in the expression to use to split the messages. |
| Correlation expression/Use Result Class<br>Type | This option appears when XPath is<br>selected in the Language list.<br><br>Select this check box to set the result type of the sub-messages<br>in the field that appears. The default native XML objects<br>org.w3c.dom.NodeList will be used if not<br>specified. |
| Correlation expression/Add<br>Namespaces | This option appears when XPath is<br>selected in the Language list.<br><br>Select this check box to add namespaces for the Xpath expression.<br>Click [+] to add as many namespaces<br>as required to the table and define the prefix and URI in the<br>corresponding columns. |
| Use Strategy | Select this check box to refer to an aggregation strategy to assemble the<br>replies from the sub-messages into a single outgoing message from the splitter.<br>Enter the ID of the aggregation strategy or select a predefined aggregation strategy.<br><br><ul> <li> <span>UseOriginalAggregationStrategy</span>: Use the original                        exchange.</li> <li> <span>UseLatestAggregationStrategy</span>: Use the latest                        exchange.</li> <li> <span>GroupedMessageAggregationStrategy</span>: Aggregate all                        messages into a single combined exchange holding all the aggregated messages                        in a list of messages as the message body.</li> <li> <span>GroupedExchangeAggregationStrategy</span>: Aggregate all                        exchanges into a single combined exchange holding all the aggregated                        exchanges in a list of exchanges as the message body. </li> <li> <span>GroupedBodyAggregationStrategy</span>: Aggregate body of                        input messages into a single combined exchange holding all the aggregated                        bodies in a list of objects as the message body.</li> </ul><br><br>Information noteNote: The predefined aggregation strategies are available only if you have<br>installed the R2024-10 Talend Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator.<br><br>The<br>sub-message replies will be aggregated in the order they come back if<br>Streaming is enabled. If not, the<br>sub-message replies will be aggregated in the same order as they were<br>split. |
| Parameters/Parallel<br>Processing | Select this check box to process the sub-messages<br>concurrently. The caller thread will wait until all sub-messages have<br>been fully processed before it continues. |
| Parameters/Stop on<br>Exception | Select this check box to stop processing immediately<br>when an exception occurs. |
| Parameters/Streaming | Select this check box to split the message in a<br>streaming fashion, which means it will split the input message in<br>chunks. It is recommended to enable this option when processing big<br>messages. |
| Parameters/Share Unit of<br>Work | Select this check box to share the unit of work between<br>the parent exchange and each split exchange. For more information and an<br>use case of this option, see the site http://camel.apache.org/splitter.html. |
| Parameters/Timeout | Specify a total timeout in millisecond. If the message is not split and<br>processed within the given time frame, the timeout triggers and the splitter<br>breaks out.<br><br>If you have installed the R2023-05 Talend Studio Monthly update or a later one delivered by Talend, you can use context variables of String or<br>Long type in the Timeout<br>parameter. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cSplitter is used as a middle<br>component in a Route. |
| Connections | <ul> <li> <span>split</span>: Select this link to route the split                  messages to the next endpoint.</li> <li> <span>Route</span>: Select this link to route all the messages                  from the sender to the next endpoint.</li> </ul> |
| Limitation | n/a |

**Related concepts**

* [Using cSplitter to split a message and aggregate replies from sub-messages](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-splitter/csplitter-cdirect-csetbody-ctimer-using-csplitter-to-split-message-and-aggregate-replies-from-sub-messages)