How to consume message from jms server and transform it into db
Hi, I want to consume a message from my jms topic, the message content is xml format, how can I transform it and persist the data into db. e.g.: the topic is ems topic, 1. I can use tJms component to connect the topic and get the message and output to tLogRow (fine) 2. tMap do the mapping (Not sure) 3. DBConnection and persist the mapped data into db. (fine) How can I transfer it before I persist it into db, if it's a xml file, we can define the mapping with tMap, but if I get the xml string from the topic, how can I do the mapping? Please advise. Thanks in advance.
Re: How to consume message from jms server and transform it into db
Hi, You have tJMSInput or tMOMInput component which give you the opportunity to connect to a QUEUE and retrieve the message to be parsed and load into a DB. If your message is an XML message; after the tMOMInput; you have to use a tExtractXMLFields and then map to your DatabaseOutput (maybe a tMap is require to perform data mapping and data transformation issues). If your message is a commaSeparated or whatever format; you have also tExtractDelimitedFields or tExtractPositionalFields to parse the right message format and load to your expected output.