July 30, 2023

cErrorHandler – Docs for ESB ESB 7.x


Processes errors in the message routing.

cErrorHandler Standard properties

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

The Standard
cErrorHandler component belongs to the Exception Handling family.

Basic settings

Default Handler

This error handler does not support a dead letter queue and will
return exceptions back to the caller.


Set Maximum Redeliveries: select
this check box to set the number of redeliveries in the Maximum Redeliveries (int) field.


Set Redelivery Delay: select this
check box to set the initial redelivery delay (in milliseconds) in
the Redelivery Delay (long)


Set Retry Attempted Log Level:
select this check box to select the log level in the Level list for log messages when retries
are attempted.


Asynchronized Delayed Redelivery:
select this check box to allow asynchronous delayed


More Configurations by Code:
select this check box to enter codes in the Code box for further configuration.

Dead Letter

This handler supports attempting to redeliver the message exchange
a number of times before sending it to a dead letter


Dead Letter Uri: select this
check box to define the endpoint of the dead letter queue.

Other parameters share the same meaning as those of the default

Logging Handler

This handler logs the exceptions.


Set Logger Name: select this
check box to give a name to the logger in the Name field.


Set Log Level: select this check
box to decide the log level from the Level list.


Usage rule

cErrorHandler is used separately
or as a middle or end component in a Route. If this component is
used separately, it will handle errors in all sub-routes. If this
component is used in the middle or end of a sub-route, it will only
handle exceptions that happen in the components of this sub-route,
either before or after the cErrorHandler.



Logging the exception thrown during a client/server talk

This scenario applies only to Talend Open Studio for ESB, Talend Data Services Platform and Talend Data Fabric.

In this scenario, a Jetty server is started before a client browser requests access to it.
Then an exception is thrown at the server side and logged by cErrorHandler.

Dropping and linking the components

  1. Drop the following components from the Palette onto the
    workspace: cMessagingEndpoint, cErrorHandler and cProcessor, labelled as Jetty_Server, Error_Handler
    and Throw_Exception respectively.
  2. Link cMessagingEndpoint and cProcessor using a Row >
    Route connection.


Configuring the components

  1. Double-click cErrorHandler to open its Basic settings view in the Component tab.


  2. Select Logging Handler to log the exceptions that are
  3. Double-click cMessagingEndpoint to open its Basic settings view in the Component tab.


  4. In the Uri field, enter
    jetty:http://localhost:8889/service to specify the Jetty
  5. Click Advanced settings for
    further setup.


  6. In the Dependencies table, click the [+] button to add a line and select
    jetty from the Camel
  7. Double-click cProcessor to
    open its Basic settings view in the
    Component tab.


  8. In the Code box, enter throw new Exception("server
    side error")
    to throw an exception.
  9. Press Ctrl+S to save your Route.

Viewing code and executing the Route

  1. Click the Code tab at the bottom of the design workspace
    to check the generated code.


    As shown above, the route starts from the endpoint Jetty_Server
    and throws the exception of server side error via
  2. Press F6 to execute the Route.


    The Jetty server has started.
  3. Launch an Internet browser and enter
    http://localhost:8889/service (the Jetty server URI
    configured above) in the address bar to access the server.


    As shown above, the request failed due to the server error.
  4. Go to the Studio and check the results in the Run


    As shown above, cErrorHandler has logged the exception
    at the level of ERROR.

Document get from Talend https://help.talend.com
Thank you for watching.
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x