Hi All,
Please help me in designing my jobs for below requirement. we have to read XML messages like below from message queue continuously <Root> <Header><table>emp</table><empcount>12</empcount></Header> <Detail><empno>111</empno><empno>222</empno>..........</Detail></Root>. Job should be started and waiting for the messages If there is a message in the message queue it should create a sequential file with all employee numbers in the queue and wait for one more message to arrive. Like that it should keep running and create sequential files with timestamp suffix. Please let me know which stages should I use and How can I execute the job continuously(without using sequences).
MQ and XML Stages.
Moderators: chulett, rschirm, roy
Snapping out the sequential files separately will be a challenge, because the job resloves filenames (using the normal sequential stages) at start up time....
What's your message frequency? (how often do messages arrive?)....
Ernie
What's your message frequency? (how often do messages arrive?)....
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
MQ and XML Real time stages
Hi Ernie,
Messages may arrive at every 2 minutes interval are more.
Please let me know how can we allocate file names dynamically.
Thanks
mrvsr.
Messages may arrive at every 2 minutes interval are more.
Please let me know how can we allocate file names dynamically.
Thanks
mrvsr.
Thanks
MRVSR
MRVSR
Flat files once opened are a bear to manage in a real-time Job, because the Job doesn't "let go" of the file until it is complete, and "real time" jobs stay running, with files "open.". While there might be some tricks you could use, most times I've seen games played with flat files it's like playing with fire --- too many chances to get burnt, and other solutions (javaPack or custom Operator) involve a lot more complexity.
If your messages arrive "in two minute intervals", then have the job time-out after waiting 10 seconds and then get launched again. If it's a monsterous job and takes forever to load up into memory that could be an issue, but if not, it's the simplest, albeit not the most elegant solution.
Alternatively, I was thinking about the XMLOutput Stage, which has the ability to "snap" new files with appended index value in their names (don't put an output link on the Stage -- and specify the xml document filename in the appropriate property). Could be an interesting trick there, but you'll have to play around a lot with the XMLOutput Stage to get it to produce the file format you are looking for. It may still force you to have at least "some" tagging surrounding your data. But it might be close enough to what you need to make it worthwhile.
Ernie
If your messages arrive "in two minute intervals", then have the job time-out after waiting 10 seconds and then get launched again. If it's a monsterous job and takes forever to load up into memory that could be an issue, but if not, it's the simplest, albeit not the most elegant solution.
Alternatively, I was thinking about the XMLOutput Stage, which has the ability to "snap" new files with appended index value in their names (don't put an output link on the Stage -- and specify the xml document filename in the appropriate property). Could be an interesting trick there, but you'll have to play around a lot with the XMLOutput Stage to get it to produce the file format you are looking for. It may still force you to have at least "some" tagging surrounding your data. But it might be close enough to what you need to make it worthwhile.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>