Author |
Message
|
BarryB |
Posted: Mon Jul 19, 2004 10:46 am Post subject: MQClient Connection/Get with Wait |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
Is it not recommended to have an application use a get with wait unlimited when the app resides on an MQClient Windows box which is awaiting messages on the MQServer residing on AIX? It appears when our application does the get with wait unlimited, the app just hangs and never processes the messages on the queue.
1) We have already checked that we are using the correct get options
2) We have checked the MQ infrastructure
We cannot find anything or any errors that occur when the app hangs. Is it recommended not to use the get with wait unlimited when using a client connection? If so, where can I find this documentation? |
|
Back to top |
|
 |
kirani |
Posted: Mon Jul 19, 2004 11:17 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Is this related to the problem described in this tread,
http://www.mqseries.net/phpBB2/viewtopic.php?p=66159
There is nothing wrong in using get with unlimited wait in a Client or server application.
Is it that your program is hanging (not responding at all) or the application is unable to get message from the queue? _________________ 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 |
|
 |
BarryB |
Posted: Mon Jul 19, 2004 11:47 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
It is the application just hanging. Someone advised they wouldnt recommend using a get with wait on an MQClient channel. Do you agree? |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Jul 19, 2004 11:54 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I've used get with waits from a client. If you aren't going to wait, then are you going to re-issue the MQGET immediately? You definitely need to make sure that you specify the fail if quiescing option so that the get will return if the qmgr is shutting down. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Mon Jul 19, 2004 12:09 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Hmmm I didn't say MQGET with wait was not recommended....if I did I certainly retract that statement. What I meant to say...and thought I had said was that I personally wouldn't do a MQGET with a wait unlimited.
[/b] |
|
Back to top |
|
 |
kirani |
Posted: Mon Jul 19, 2004 12:45 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Barry,
As bower5932 said, use correct options like "fail if quiescing", etc in such applications.
Is it possbile to put some trace within your program to see where exactly it's hanging. May be its waiting for some resource. Put some printf/cout statements in your programs. _________________ 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 |
|
 |
zpat |
Posted: Tue Jul 20, 2004 5:15 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
My recommendation is ALWAYS to use GET with WAIT, rather than keeping "polling" which is very inefficient. We have thousands of MQ Clients (on all our PCs) doing MQGET WAITs all day long.
Do this:
(set the wait interval to perhaps 60 seconds)
MQGET with options CONVERT, WAIT, FAIL_IF_QUIESCING.
If MQ quiescing then exit
If MQ has passed back a message then process it as required.
If no message data available then null
If other MQ errors then handle appropriately
If client app being stopped (operator command etc) then exit
Repeat forever |
|
Back to top |
|
 |
BarryB |
Posted: Tue Jul 20, 2004 5:30 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
Thanks all...I will try this. |
|
Back to top |
|
 |
|