# cIntercept

Intercepts each message sub-route and redirects it in another sub-route without modifying the original one. When this detour is complete, message routing to the originally intended target endpoints continues. This can be useful at testing time to simulate error handling.

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

## cIntercept Standard properties

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

The Standard cIntercept component belongs to the Exception Handling family.

## Basic settings

| Properties | Description |
| --- | --- |
| Intercept type | Select the intercept type from:<br><br><ul> <li><span>Any</span>: Intercepts every processing step as they                           happen during routing.</li> <li><span>From</span>: Intercepts only the incoming step. </li> <li><span>To</span>: Intercepts only when an exchange is about to                           be sent to the given endpoint.</li> </ul> |
| Component filter | This option is available when the From or<br>To intercept type is selected. Enter the component name<br>if you want to only intercept specific components.<br><br>The component filter<br>supports endpoint pattern matching by the following rules in the given order:<br><br><ol> <li>match by exact URI name</li> <li>match by wildcard</li> <li>match by regular expression</li> </ol> |
| Send to original endpoint | This option is available when the To intercept type<br>is selected. When enabled, the message will be sent to the original endpoint. If<br>this checkbox is cleared, the message will not be sent to the original intended<br>destination. |
| Send to additional endpoint | This endpoint is available when the To intercept type<br>is selected. If you want to send the message to additional endpoint, select this<br>checkbox and specify the additional endpoint in the After<br>URI field. When this option is enabled, the message will be sent to<br>the original endpoint as well even if the Send to original<br>endpoint option is disabled. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cIntercept is a start component of a sub-route. |
| Connections | <ul> <li> <p> <span>Row / Route</span>: Select the                           <span>Route</span> link to intercept all the messages of all the                           sub-routes listened to by the <span>cIntercept</span>.</p> </li> <li> <p> <span>Trigger / When</span>: Select the                           <span>When</span> link to filter the messages to intercept and                           click the <span>Component</span> view.</p> <p>In the <span>Type</span> list, select the type of language you will                           use to declare your condition.</p> <p>In the <span>Condition</span> field, type in the condition that will                           be used to filter the messages.</p> <p>All the messages that do not match this condition are dropped by default or can                           be retrieved with the <span>Otherwise</span> link to a different                           channel. </p> </li> </ul> |
| Limitation | To keep the original sub-routes untouched, cIntercept only be<br>used in a separate sub-route. |

**Related concepts**

* [Intercepting subRoutes from given component](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-logs-and-errors/cintercept-cfile-cprocessor-cstop-intercepting-subroutes-from-given-component)