tJMSOutput body + header

tJMSOutput body + header

Hello,
In my jobs I use tJMSOutput and in my route I call cJMS.
When I use tJMSOutput I want to pass a xml and some data in header.
It's possible ?
Best regards,
lmartin
Moderator

Re: tJMSOutput body + header

Hi,
Can you try to put a JavaRow with such a code before your tJMSOutput 
javax.jms.TextMessage m = session_tJMSOutput_1.createTextMessage();
m.setText(message);
m.setStringProperty("Action","Update");
output_row.message = m;
And set processing Mode as  "RawMessage" in tJMSOutput to see if it works?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: tJMSOutput body + header

Hi,
It's works !
After tXMLMap, we get a message with Document type .
In tJavaRow we transform message into String type and in our ouput tJavaRow we set message to object type.
javax.jms.TextMessage m = session_tJMSOutput_1.createTextMessage();
m.setText(customers.message.toString());
m.setStringProperty("Action","Update");
output_row.message = m;
An another question Smiley Happy, when I send 2 xml in my queue MQ. When I get the first xml, he is fine but the second is the first one (xml) and the second concatenate.
I need to clear the queue between two sending ?
Best regards,
Loïc