Skip to main content

What is a Routelet

A Routelet is a specific component that replaces Route component groups. It factorizes recurrent processing or complex transformation steps to ease the reading of a complex Route. Routelet can be reused in different Routes or several times in the same Route.

This feature is not shipped with Talend Studio by default. You need to install it using the Feature Manager. For more information, see Installing features using the Feature Manager.

At runtime, both Route and Routelet are instances of Apache Camel RouteBuilder. Routelet will be also created as a dedicated Java class during Talend Studio code generation. Routelet is not supposed to be running independently but share the same CamelContext with the parent Route. Multiple RouteBuilder instances can be added into one CamelContext.

This way, the Routelet use does not have any drawbacks on the performance side. The execution time is unchanged whether your Route includes a Routelet or the whole subroute directly.

Moreover if you intend to log and monitor the whole Route statistics and execution error or warnings, the Routelet included in your Route will be monitored without requiring further log component (such as cLog).

A Routelet is easily identified as it is enclosed in a dotted square on a green background.

"Routelet_VM_1" in Talend Studio.

This specific component can be used like any other usual component in a standard Route. For more information on how to design a Route, see Getting started with a basic Route.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!