|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
first message is missed when my client starts up |
« View previous topic :: View next topic » |
Author |
Message
|
dcipher18 |
Posted: Tue Mar 25, 2003 9:49 am Post subject: first message is missed when my client starts up |
|
|
Novice
Joined: 05 Sep 2002 Posts: 11 Location: Chicago
|
Hi all,
I'm programming using the java client classes on a Unix environment -- connecting to a remote unix machine. My program starts up and loops...
1) reads message from queue (infinite wait)
2) processes the message
3) sends a response (and then waits again for the next message)
My problem is that when my program starts up it seems to miss the first message on the queue.
Do you have any ideas why this might be? It does appear to be only the FIRST message (or perhaps beginning messages that were sent during a brief period when my program was restarted).
Could it be something to do with unclean disconnection of channels or connections to queue managers etc from the end of a previous program run or something like that -- my client program only stops when it is killed and therefore isn't able to cleanly disconnect from the QueueManager. Could this be the problem? and do you know any ways around this?
Thanks in advance
Eddie |
|
Back to top |
|
 |
mqonnet |
Posted: Tue Mar 25, 2003 10:52 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Could you explain what you mean by "Miss the 1st message". How do you determine that this is the 1st message put after the application was started. Or is it that the message was not retrieved from the apps previous run.
Under normal circumstances, if an app is killed while it was doing a get. The message is restored to the queue if you are using syncpointing on get. Otherwise, the message is discarded/lost. This could be one of the other possibilities.
Need more info as to how you run the test and how you conclude that 1st message is not being retrieved.
Cheers
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
dcipher18 |
Posted: Tue Mar 25, 2003 11:17 am Post subject: |
|
|
Novice
Joined: 05 Sep 2002 Posts: 11 Location: Chicago
|
Hi Kumar,
Thank you for your interest in this problem. I can only really tell you the situation based on how we have been able to replicate the problem. I am co-ordinating with someone working on an AS400 system. They send me the messages and I process them and respond. They send messages to an AS400 QueueManager which forwards it to a Unix QManager which, in turn, forwards it to my program when I perform a get. Anyway, here are the steps involved for us to replicate the problem.
1) My program is running and processing messages happily.
2) My client program is killed... (while it is involved in a get with infinite wait).
3) There are no messages being sent to me by the AS400 system.
4) I start my program... it seems to have no trouble connecting to the queue manager etc.
5) My program sits and waits for a message to process.
6) AS400 team actively sends a message. It never reaches my program.
7) AS400 team sends another message. My program picks it up, processes it and responds in the expected manner... and successfully responds to any other messages subsequent to this.
The MQSeries administrator on the Unix side has been unable to come into work (and I don't know when he will be back in) so I can't really ask him what is happening. I was hoping that myself and my colleague on the AS400 team could figure out what was going on... and if it is something that needs an administrator to fix... then maybe we can get someone else in the company to do it... or atleast we will know what the problem is for when the MQSeries administrator is available.
Does this help you understand our situation?
Thanks in advance for any follow-up responses.
Eddie |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Mar 26, 2003 12:37 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I think your problem is coming from your client program being killed. The client program has an agent that runs on behalf of it. When your program is killed, the agent is left running in the MQGET. It gets the next message, sees that your client has gone away, and throws the message away. You probably ought to MQGET your message in syncpoint. This will allow the agent to realize you've gone away and it will put the message back on the queue.
You should also not kill your client since this doesn't allow it to issue the MQDISC which shuts the agent down. There are also some tcp/ip type of parameters on the channel (HBINT) which can be used to allow the agent to see if the client is still there. |
|
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
|
|
|
|