Killing a Route when exception Handled

Six Stars

Killing a Route when exception Handled

Hi,
I am new to Talend ESB and i got requirement..I have one service in route that i need to call in the DI Job. lets say i am setting the file service in route and i need to call the file from talend job,So i would like to set the exception when any error occoured in talend di job and send the mail to the required person with the exception message.After setting the mail the route should get stopped..Any one could suggest me the process of setting the exception and killing the route.
Thanks,
Avinash
Community Manager

Re: Killing a Route when exception Handled

This is a tricky thing to handle. From experience, the best way to stop a route is to do it from another route. So I would recommend directing a message to an endpoint in the route you want to stop which points to a "stopping route". This route could handle an error message for you and stop the route you wish stopped. This page should help you when it comes to stopping the route. A thing to remember is that Talend routes are really Camel Contexts, not routes. The routes sit inside the Camel Context. Keep that in mind when testing this.
I set myself almost this very same challenge when I first started working with Talend ESB and it took me ages to crack. Mainly because I thought that I could do it from within the same Camel Context. You can, but it takes a lot of code to do it elegantly.
Moderator

Re: Killing a Route when exception Handled

Hi,
We have replied your another topic:https://www.talendforge.org/forum/viewtopic.php?id=44668(Sent Notification & Stop ESB Route when error in cTalendjob component.). Could you please take a look at it to see if it is satisfying your needs?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch