Author |
Message
|
BarryB |
Posted: Thu Jul 15, 2004 10:29 am Post subject: Get With Wait - problem - help |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
We issue a get with wait on our application on a queue....say an hour goes by...then a message is put on the queue...our application just hangs and does not get the message...any clues would help????? |
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 15, 2004 10:38 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What is the WaitInterval specified in the app?
Is it possible to put additional trace in the application? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
EddieA |
Posted: Thu Jul 15, 2004 11:04 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
How are you "seeing" that the message is present. Is it just the message count (in which case it might not be committed), or can you actually browse the message (Explorer or amqsbcg).
Is the GETting application waiting for a specific message, based on MessageID or CorrelationID. Is it the 1st message it "fails" on, or a subsequent one (Fields not cleared between GETs).
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
BarryB |
Posted: Thu Jul 15, 2004 11:43 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
Ok..here is the scenario..
First Message put on the queue (Cluster queue) under syncpoint. The Commit is then issued.
Now the message is on the queue.
I can then browse the message using MQExplorer or WMQTool.
The Java application opens the queue and does a get with wait (wait is set to unlimited). The message is then processed, and committed.
The Java app then goes back to a get with wait state on the queue (mind you, a close of the queue has not happened, nor a disconnect - from the first message).
No message on the queue. Now after a few minutes, a new message is put on the queue.
If another message appears on the queue, the Java app just hangs there in a get wait state (unlimited). If you stop and start the Java program, that message is then retrieved and processed, and then the hanging starts again once another message arrives.
The only way we can cure the problem now is to keep restarting the Java app. Is this something with MQ, or is it the app?????? |
|
Back to top |
|
 |
EddieA |
Posted: Thu Jul 15, 2004 11:54 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
If the Java app is using the same MQMessage, then you need to clear the MessageID and CorrelationID between calls:
Code: |
messageBuffer.messageId = MQC.MQMI_NONE;
messageBuffer.correlationId = MQC.MQCI_NONE; |
Otherwise the 2nd call is looking for a message with the same MessageID and CorrelationID as the 1st one it retreived.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
BarryB |
Posted: Thu Jul 15, 2004 11:56 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
The message id, correlation id and group id are all reset to none after each call...so I don't think that is the problem. Any other ideas? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jul 15, 2004 6:23 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
The message id, correlation id and group id are all reset to none after each call...so I don't think that is the problem. Any other ideas?
|
What is none? All spaces is not the same as null. Please post that section of the code if it is not exactly as Eddie laid out above. I agree with Eddie's solution. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
BarryB |
Posted: Fri Jul 16, 2004 2:42 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
We are clearing out the Message Id, Correlation Id and the Group Id. None means reset to MQMI_NONE, MQCI_NONE and MQGI_NONE.
The average size per message is about 100 - 200k. I looked into the following:
Is the message buffer/memory area that the java program (the 'getting' program) being cleaned out after each 'get', as the message is fairly large? Answer: yes
I looked on the file system in AIX to ensure we had the necessary space for the MQ files, structures, etc.. Answer: Enough space allocated
I am wondering if this may be an issue with the listener? Being that the application 'just hangs' with a getwait, even when I message arrives on the queue, and will not get the message off unless the program is stopped and restarted makes me believe maybe the 'listener' needs cycled. However, I am not sure what the command is to bounce the 'listener' on AIX, nor display it. Would anyone know? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jul 16, 2004 7:08 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I don't think the listener is the problem. If it was, that would be a very weird bug in the code.
Quote: |
Now after a few minutes, a new message is put on the queue.
|
Atthis point, can you use some other tool to browse the message? Atthe point where your Java app can't get it, can any other app browse it? If yes, we can focus on why your Java app can't get it. If no, that means the message is not committed (or some other weird problem that effects anyone and everyone) and you can focus on the problem from that end.
If you really want to end the listener, just issue the endmqlsr command. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
BarryB |
Posted: Fri Jul 16, 2004 8:06 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
I can take the message off of the queue through WMQTool, which means the message is definitely committed. This being the case, I am thinking it has to be the Java code. However, the code was not working last night as phrased in this email. Today, I came in and apparently the 'putting' applications were receiving 2056 errors on the 'puts'. I looked in the errors folder and found that trace files were taking up space indicating that 'someone' had turned on tracing. I turned off tracing, and the 2056s went away after I deleted the trace files and free'd up space. Now all of a sudden, this 'getting' java program doesn't hang on the wait anymore when a new message arrives on the queue. What the heck would tracing have to do with holding up a get process??? |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Jul 16, 2004 8:59 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well 2056 is no queue space available, usally it means the filesystem is full and MQSeries tends to not do anything when the it's filesystem is full _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
|