Author |
Message
|
pvschandu |
Posted: Sun Jul 21, 2002 10:23 pm Post subject: Very urgent -Need help in devloping mq-xml application |
|
|
Newbie
Joined: 21 Jul 2002 Posts: 5 Location: India
|
Hi,
I would appreciate If some one help me out in this case. We have a requirement where we need to convert data in a message queue into XML format and send this out in another queue(xml queue). The XML format shd contain DTD, Reference data, Header and datablock. DTD and Reference data are common to all messages. Header and datablock come from input queue and we need to convert them into xml format.
Client needs DTD followed by ref data, header and datablock in XML queue(output que).
I know basic MQ programming but im not an expert in Queue programming. Please help if there are any design constarints or suggestions in developing this application.
Application shd run 24 /7. Dev env is c++, MQ,XML
thx in advance
chandu _________________ Chandra Sekhar
MCP, VC++- COM developer |
|
Back to top |
|
 |
vjsony |
Posted: Mon Jul 22, 2002 1:41 am Post subject: |
|
|
 Apprentice
Joined: 01 Aug 2001 Posts: 45
|
Hi Chandu,
What's the frequency of the message arriving at the input queue?
Based on that, you can decide on your wait interval. Another point you may want to consider is Conversion of arriving data. You can use the MQGMO_CONVERT option.
Also whether you would like to have the GET operation under syncpoint control .
Just some pointers while getting a message.
Regards,
VJ |
|
Back to top |
|
 |
pvschandu |
Posted: Mon Jul 22, 2002 2:41 am Post subject: |
|
|
Newbie
Joined: 21 Jul 2002 Posts: 5 Location: India
|
Thx alot Vj for ur inputs.
//What's the frequency of the message arriving at the input queue?
Message may come when ever there is an updation in our main application. So this xml application shd run 24 /7.Globally people access main application and when ever there is an update, it will be posted into input queue of xml application.
I am trying to understand all the points mentioned by u.
I will get back 2 u if i have any doubts reg this.
Thx again _________________ Chandra Sekhar
MCP, VC++- COM developer |
|
Back to top |
|
 |
pvschandu |
Posted: Mon Jul 22, 2002 5:28 am Post subject: |
|
|
Newbie
Joined: 21 Jul 2002 Posts: 5 Location: India
|
Hi All
I have a question for u. Why shd I use MQGMO_CONVERT option and write data-conversion exit. I can write C ++ application where I will get data from input queue, Write my own logic to create xml fomatted data and i will put tht into xml queue.
Any problems in doing this??????
Can any one oppose this? _________________ Chandra Sekhar
MCP, VC++- COM developer |
|
Back to top |
|
 |
bduncan |
Posted: Mon Jul 22, 2002 7:14 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
You can write a C++ program, however it will be less efficient than the exit. Imagine this scenario: with the exit, the message is converted to the desired format as it is delivered to the queue. So you only need to do a single MQGET to receive the XML formatted message. Now compare this to the scenario you described: Your C++ program does an MQGET, converts the message to XML, does an MQPUT, and if under syncpoint, an MQCMIT. And finally the receiving application has to do the final MQGET. So you are doing 3 or 4 operations compared to 1 for the exit.
So like VJ said, you need to consider the message rate. If you are only getting messages every few seconds, then it doesn't really matter which method you use for efficiency purposes. However, if you are getting multiple messages per second and there is a time constraint on processing these messages and getting them to their destination, you might want to go through the extra effort of writing the exit... _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
pvschandu |
Posted: Mon Jul 22, 2002 9:10 pm Post subject: |
|
|
Newbie
Joined: 21 Jul 2002 Posts: 5 Location: India
|
Thx alot duncan.
I really liked the way u answered the question. Thx alot again for ur detailed explanation. I have already recommened abt this site to my friends. _________________ Chandra Sekhar
MCP, VC++- COM developer |
|
Back to top |
|
 |
bduncan |
Posted: Tue Jul 23, 2002 7:51 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
No problem Chandra - and thanks for passing the word on about this site!
 _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
cvshiva |
Posted: Tue Jul 30, 2002 12:20 am Post subject: |
|
|
 Apprentice
Joined: 04 Mar 2002 Posts: 35 Location: Chennai
|
Hi Brandon,
I didn't get what you really meant in the explanation given to pvschandu..!!
How do you say that you need to do only one MQGET when using the exit?. I don't think so .. bcos the Data conversion exit is gonna be a user written one just to do the xml formatting and nothing else. The receiving program have to do an MQGET on the input queue and do a MQPUT to the output queue and issue a MQCMIT if under syncpoint.. Still the calls are the same except for the "xml formatting logic" is not a part of the program as it is taken care by the exit.
I don't see any significant change in peformance using an exit whatever may be the message frequency, bcos in both cases the logic is user-written and performance entirely depends on the efficiency of the code.
Also I think the data conversion exit will be called as an user exit during the MQGET and not before or after it. So it doesn't matter whether you convert the message and take it out of the queue or take it out of the queue and convert. In any case the message stored in the queue is going to be stored in its original format and the conversion gonna be done only when necessary.
Please do correct me if my understanding is wrong..
Regards _________________ Ramnath Shiva
IBM Certified SOA Specialist
IBM Certified MQSeries Specialist
Standard Scope International Pvt Ltd , Chennai |
|
Back to top |
|
 |
|