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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loop/Retry tPOP compenent on connection error

Hello,
I have created a Talend Job in TOS 4.0.1 that connects to various e-mail accounts using the tPOP component and downloads the emails locally, fairly simple and straight forward.
The problem that I am encountering is that the tPOP component errors out if there is a connection failure or timeout, and the TOS job quits. What I would like to do is have the job not quit, but rather retry the POP connection a few more times or until it is successful, however when I try to do processing to catch the error based on component error, the job still quites. I also noticed that TOS does not easily allow you to loop back to an earlier part of the process flow.
So basically, I would like to catch the tPOP component error. If the error has to do with authentication, ssl handshake, etc., move on to the next e-mail account in the list to process, but if the error is a connection timeout then retry the connection for the account that just failed.
I appreciate any suggestions, recommendations, or insights on the best way to go about handling this.
I hope this makes sense and that someone can help. Please let me know if you require further details.
Thanks,
Tim.
Labels (2)
6 Replies
Anonymous
Not applicable
Author

I'm interested in doing the same thing, but I'm using tFileFetch instead of tPOP. Any solutions?
Anonymous
Not applicable
Author

Hello
Put the tPop process into a child job, use a tRunJob to call the child job in father job, uncheck the box 'die on error' on tRunJob. eg:
father job:
tFileInputDelimited---main--->tFlowToIterate--iterate---tRunJob
child job:
tPop
tFileInputDelimited: read all the account from a file
tFlowToIterate: iterate each account
tRunJob: call the child job, pass each account to child job by context variable(see 1654).
Best regards
Shong
Anonymous
Not applicable
Author

Hello,
I have a slightly differnent requirement for the retry loop. My requirement is: When a child job fails, try again. If it succeeds after retry, report the whole Father job as success. If not, try again. If the child job still fails after these 3 tries, report Failure. Otherwise, report success.
By uncheck "die on error", the child job gets executed 3 times. However, if all 3 tries fail, the exit code is still 0. I want to know how I can set the exit code to 1 (report error) after the 3 failed attempts.
Thanks for your help.
C. Long
Anonymous
Not applicable
Author

Hi
However, if all 3 tries fail, the exit code is still 0. I want to know how I can set the exit code to 1 (report error) after the 3 failed attempts.

You can use a tDie component to customize an error code.
Best regards
Shong
Anonymous
Not applicable
Author

shong,
Thanks for the response.
C. Long
jagadish_dasari
Contributor III
Contributor III

Hello,
Has anyone tried extracting emails from other mail boxes like "SENT MAIL"/"TRASH"/etc. using IMAP configuration in tPOP3 component?
Please let me know if anyone has succeeded doing this using TALEND Components.
Thanks,
Jagadish.