Talend Components Asynchronous Behavior

Highlighted
Seven Stars

Talend Components Asynchronous Behavior

Hi,

 

It seems that Talend components execute in asynchronous manner. For this please have a look at the attached job design.

 

In the last component (tjava_2) as shown in attachement I have simply printed some variable value. E.g. String foo = "bar";

System.out.println(foo);

 

When I start the job I noticed that this variable “foo” value gets printed first even when the job is still executing. Does this means that all Talend compnents (connectors) work in asynchronous fashion? If this is true is it possible to change this asynchronous behavior to synchronous behavior?

 

Regards

Tarunjit Singh


Accepted Solutions
Community Manager

Re: Talend Components Asynchronous Behavior

@TRF is correct. I would go further and say that the tJava should not be used connected to a "row" like this and that you should use it only with OnSubJob or OnComponent links. However, you *can* use it like this, so should use it knowing that components that process rows either side will be run synchronously, while the tJava will be run at the beginning of the SubJob.

 


All Replies
Six Stars

Re: Talend Components Asynchronous Behavior

I didn't saw such behavior yet, could you please send the log as well and make sure that you don't have same java code in any other java component.

 

Regards,

Ajinkya

Fifteen Stars TRF
Fifteen Stars

Re: Talend Components Asynchronous Behavior

Hi,
This a normal behavior.
tJava component starts first and run only once for a subjob.
You may refer to this link https://umeshrakhe.wordpress.com/2015/03/02/difference-between-tjavatjavarowtjavaflex/ or the official documentation.

TRF
Seven Stars

Re: Talend Components Asynchronous Behavior

Hi,

 

By normal behavior you mean the normal behavior of tJava component.

Otherwise all componets (connectors) behave in synchronous fashion?

 

Regards

Tarunjit Singh

Community Manager

Re: Talend Components Asynchronous Behavior

@TRF is correct. I would go further and say that the tJava should not be used connected to a "row" like this and that you should use it only with OnSubJob or OnComponent links. However, you *can* use it like this, so should use it knowing that components that process rows either side will be run synchronously, while the tJava will be run at the beginning of the SubJob.

 

Six Stars

Re: Talend Components Asynchronous Behavior

Thanks @TRF . I agree @rhall_2_0, I didn't noticed that java_2 is connected using row_main. I considerd it would be connected using onComponentOk or OnSubJobOk

 

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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