Five Stars

How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

I'm trying to create a a sample job which adds a new message to Apache Active MQ server.

 

1. Using tInputFile to take read a string from file.

2. using tJMSoutput to send a message to MQ server.

 

I'm getting the compiling error from tJMSOutput component.

1 ACCEPTED SOLUTION

Accepted Solutions
Twelve Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

Screen Shot 2018-06-12 at 5.42.08 PM.png

 

You have input fileContent, output message

tMomOutput not understand this, You could:

  1. input tMap before tMomOutput for map one column to other (definitely work)
  2. or try do this in tConvertType, not sure - need test
-----------
7 REPLIES
Twelve Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

generally all work, error mean - You make some mistakes in components configuration

 

Screen Shot 2018-06-10 at 13.22.28.png

 

what error? it is not possible to guess, unless You hide information 

-----------
Five Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

I'm creating this simple job to read a file as 'string' and send that file content to Apache Active MQ server from tJMSOutput component.

 

Please find attachment for more information, Please let me know if there is any info requirement. Please help me solving the issue. I'm new to Talend ESB

 

Capture1.JPGJob OverviewCapture2.JPGtInputFile propertiesCapture3.JPGtInputFile schemaCapture4.JPGtJMSOutput propertiesCapture5.JPGtJMSOutput schemaCapture6.JPGError messageCapture7.JPGError showing in codeCapture8.JPGError showing in code

 

 

 

Five Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

I have also tried it with jMOMOutput component but I'm getting the same error "Message cannot be resolved or not a field"

 

Capture9.JPGCapture10.JPGCapture11.JPG

Twelve Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

You use wrong type conversion

 

You are try to convert object to String

 

tFileInputRaw - read whole context of file as row, if You want process row by row - use tFileInputDelimitter

with 1 column - message and delimiter | or what not present in Your file

if 1 file 1 message - use tConvertType for convert Object to String

it work

-----------
Five Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

 

Hello Sir,

 

I've tried this way also. But it's not working. It's giving the same error "message cannot be resolved or is not a field"

I've also tried it with tInputDelimited component.

 

newCapture1.JPGJob and tFileInputRaw propertiesnewCapture2.JPGtConvertType propertiesnewCapture3.JPGtConverType SchemanewCapture4.JPGtMOMOutput propertiesnewCapture5.JPGtMomOutput SchemanewCapture6.JPGtextSample.txt (Input File)

Twelve Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

Screen Shot 2018-06-12 at 5.42.08 PM.png

 

You have input fileContent, output message

tMomOutput not understand this, You could:

  1. input tMap before tMomOutput for map one column to other (definitely work)
  2. or try do this in tConvertType, not sure - need test
-----------
Five Stars

Re: How to add a new message to ActiveMQ using tInputFile and tJMSOutout ?

You sir, are awesome. tMap worked. Thanks a lot for bearing me.

SolCapture.JPGMappingSolCapture1.JPGtMapSolCapture3.JPGQueue Created