|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
what if wait option fails in a grouping scenario |
« View previous topic :: View next topic » |
Author |
Message
|
brgmo |
Posted: Tue Nov 18, 2003 4:42 pm Post subject: what if wait option fails in a grouping scenario |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
Hi All
I have a problem in which i am expecting replies for the 10 requests which were sent as a part of group to a application. Suppose i send 10 request messages as a part of a group to the processing application. Now i am waiting for the responses which i again have to recollect and make a single message and put on the queue. Now suppose if i get 9 messages under sync-point commit after each retrieval and retrieval of the 10 th message fails due to time out limits, then can anybody tell me what can be the various scenarios of handling the integarity of the retrieved message.
Regards
brgmo |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 18, 2003 5:03 pm Post subject: Re: what if wait option fails in a grouping scenario |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
brgmo wrote: |
can anybody tell me what can be the various scenarios of handling the integarity of the retrieved message. |
I don't think any one can tell you. It sounds like you have business requirements. Those business requirements should tell you what the "right" decision is. What does it mean if you don't get all responses in the right amount of time? Are you supposed to respond in that case, or not? Are any of the responses you DID receive valid anymore? Is it okay to respond if you don't get the 5th response, but not if you don't get the 10th response?
The answers to these and other similar questions will help you figure out what you need to do.
But once you commit a message, it's commited. So if you're doing get-commit-get-commit-get-commit, etc, then you can't roll back the other 9 when you realize you didn't get the tenth. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Nov 19, 2003 6:22 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
This sounds to me like you want to put all of your messages in a group and issue your get with MQGMO_ALL_MSGS_AVAILABLE. This will keep you from getting any of the 9 until all 10 are there. You can then get all of them in a single unit of work and issue the commit after the 10th. |
|
Back to top |
|
 |
brgmo |
Posted: Sat Nov 22, 2003 9:21 am Post subject: how grouping can help me!!! very urgent!!!! |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
I think i should give a complete scenario. I have an application which reads a xml file. After reading the file, it segments the file into multiple request messages and for each request message, a reply is expected.So, suppose if there are 10 messages in the file and they all are sent as a group, then i have the following requirements when the response messages come.
1.All the responses messages should be combined into a single message and this single message containing the 10 response message should be used for constructing the file which will be stored somewhere on the hard-disk.
2.There should be proper report mechanism which will track the entire system at each step like whether the request message was processed without error and if any error occured while processing then it should inform the system about that.
3.In case any error occurs during processing, then how to generate the response message for that particular request message which will go as a response message for that particular message when getting response messages under sync-point.
4.If within a given time-out period, all the response message doesn't arrive then it should send the available message by forming a single message out of all the response message of that group.
Any help wiil be highly appreciated because i have told the management that all this can be done with the help of mqseries and they have asked me to build a prototype using java which will address all the above issues. Any sample code will be really helpful.
Thanks
brgmo |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Nov 22, 2003 10:20 am Post subject: Re: how grouping can help me!!! very urgent!!!! |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You need to write java programs that will do the following things: - Generate request messages and receive reply messages.
- Receive a request and process it and generate a reply message.This could be many programs, one for each type of request.
The request messages should specify an expiration time, a ReplyTo queue, and report options to generate a report on expiration in the message header. The requesting process should look for both the reply messages and the expiration reports on the ReplyTo queue.
Each "server" process (reply generator) should create a reply message that either contains either the correct data or information about the error that occurred.
I believe there are sample "request/reply" java programs available on the IBM developer website. In addition, the request/reply process is described in the Application Programming Guide and specifics about working with Java in the Using Java manual.
But your #3 is what I said that other people can't help you with, since it's very dependant on what your business requirements are. Maybe your business requirements allow you to ignore these errors, maybe they don't. But this is why I suggest that the "server" process should generate an "error" reply. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
brgmo |
Posted: Sat Nov 22, 2003 12:48 pm Post subject: |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
Thanks a lot for responding, Jeff. I have already written a program which does request replies using message(file converted into individual message).my problem is what if a message in a particular group arrives late, then what will happen to other messages .will they remain in the queue or is there any way by which i can retrieve whatever messages of a group are retrieved, pack them into a single message,convert them to a file.
what will happen in case a message has been retrieved by the application and it fails to process that message then in that case can i send some report message to the application using mq reporting techniques. your fast reply will be highly appreciated.
thanks
brgmo |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|