Six Stars

Active MQ message not able to write to FIle Delimeter

Hi,

 

Am reading active MQ message using component tJMSInput, after that writing the message into a file using tFileOutputDelimeter.  Message is not getting written to a file only header is available in the file.

 

What I observe is file is getting locked by JMS and its not writing. I need to close JMS connection i guess.

 

Please suggest on the issue.

1 ACCEPTED SOLUTION

Accepted Solutions
Ten Stars

Re: Active MQ message not able to write to FIle Delimeter

first of all, You could tell for Talend write data to file for each row:

Screen Shot 2018-01-17 at 1.59.44 PM.png

 

second, You could use tFlowToIterate, which will process all steps for each received message:

Screen Shot 2018-01-17 at 2.00.27 PM.png

 

 

do not forget - when You work with streams, You must change Your logic
You can switch to routes (Open Studio for ESB),or as third variant - add loop in Job, for make a batches:

- top level of loop - infinite

- Input component - or read XXX (for example 1000 messages) or read with timeout (for example 5 sec from last message)
- receive batch -> proceed all
- next loop iteration

-----------
7 REPLIES
Six Stars

Re: Active MQ message not able to write to FIle Delimeter

what do you mean by " file is getting locked by JMS" ?

can you please attach a screenshot if possible?

Six Stars

Re: Active MQ message not able to write to FIle Delimeter

Hi,

 

Please find the attached document for error details, provided the configuration details screen shot and also error of the file when it get locked during the job was up.

Six Stars

Re: Active MQ message not able to write to FIle Delimeter

Hi,

 

Please find the attached document for error details, provided the configuration details screen shot and also error of the file when it get locked during the job was up.

Six Stars

Re: Active MQ message not able to write to FIle Delimeter

you are trying to write in a text file and the error listed on the "Xls" file as provided in the screenshot. can you try by changing the file format to CSV and see if that works.

Six Stars

Re: Active MQ message not able to write to FIle Delimeter

Hi,

 

I have tried to write to txt,xls,csv file. All the files only store header but the message from JMS.

 

I also tried to write between file delimeter to file delimeter, it was working fine. Only concern is why its not working between JMSInput to file delimeter.

 

I had also put tlogRow after reading the message from JMSInput, log is coming fine with values but its not writing to a file.

 

I had observe that when I change the property of JMSInput Maximum message to 1 instead of -1, it write single message sucessfully to a file, but this wont solve problem when we have multiple messsages. So need assistance to address read multiple messages from JMS to file.

Ten Stars

Re: Active MQ message not able to write to FIle Delimeter

first of all, You could tell for Talend write data to file for each row:

Screen Shot 2018-01-17 at 1.59.44 PM.png

 

second, You could use tFlowToIterate, which will process all steps for each received message:

Screen Shot 2018-01-17 at 2.00.27 PM.png

 

 

do not forget - when You work with streams, You must change Your logic
You can switch to routes (Open Studio for ESB),or as third variant - add loop in Job, for make a batches:

- top level of loop - infinite

- Input component - or read XXX (for example 1000 messages) or read with timeout (for example 5 sec from last message)
- receive batch -> proceed all
- next loop iteration

-----------
Six Stars

Re: Active MQ message not able to write to FIle Delimeter

Thank you for input, I tried giving the option custom flush buffer size as 1. It got write the data to file. So I did not go for second option suggested.

Thank you so much !!!