Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

@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.

 

View solution in original post

5 Replies
Anonymous
Not applicable
Author

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

TRF
Champion II
Champion II

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.
Anonymous
Not applicable
Author

Hi,

 

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

Otherwise all componets (connectors) behave in synchronous fashion?

 

Regards

Tarunjit Singh

Anonymous
Not applicable
Author

@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.

 

Anonymous
Not applicable
Author

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