Hi all, I read in Talend Integration Factory Presentation that it was possible to integrate a job designed with Talen Open Studio in a Camel route by using a Camel component. I would like to test this feature and integrate a sample Talend Job in a Camel route but I did not find how to process to do this. Could somebody help me to do this? Thanks in advance for your help
Re: How to integrate Talend jobs on Camel routes ?
Hi Valentin, Sorry for the late reply. Yes, it is possible to invoke a Talend job from a camel route and you can find the component here: https://github.com/Talend/tif/tree/master/components/camel-tis. The component is not yet documented because it's experimental at this stage and during its development we identified improvements in TOS that would make this integration seamless. The improvements are mostly related to packaging actually and if you make some repackaging changes manually it would work. The Talend jobs as generated currently don't run in in OSGi containers either. We are committed to OSGi, so this is addressed as well. Changes will come incrementally during the course of this year in both TOS and TIF. The component has a unit test though which you could look at that should guide you through the necessary steps if you want to try it out. Camel and TOS take a different approach to integration. TOS is (batch) job oriented while Camel is more message oriented (with a bit of overlap in between). The job generated by TOS has one entry method runJob that gets invoked by camel, so keep in mind that when a message comes on a camel route the whole job gets executed. That may affect a bit the way you design your Camel routes. The approach that would work best I think is to have multiple Camel routes. One one you would use camel normally to accumulate messages a store them somewhere (like a directory) and have a second route and some sort of trigger (like camel-quartz for instance, but anything would do) that will send one message on a second route once enough data was accumulated. The second route would be simple, just invoke the TOS job to do the batch processing. For the packaging changes, the simplest is to start with the pom.xml in the source. You'll see that I had to unpackage the zip produced by TOS, take the dependent libraries and put them somewhere on the classpath (they are in src/test/lib and look at the <scope>system</scope> and the <systemPath> configuration in the pom.xml). So it works, but there is some room for improvement and we're working on that. If you give it a try feedback is welcome and if you have more questions I promise you'll get an answer much faster.