Author |
Message
|
dustoff |
Posted: Wed Oct 13, 2004 11:09 am Post subject: |
|
|
Newbie
Joined: 12 Oct 2004 Posts: 9
|
Just wanted to say thanks to all for your responses!
bower5932 - thanks! I tried your suggestion only to find I do not have write access to my input queue. I will have to talk to the queue owner to try get rights, but the reasoning behind it I do not think they will feel it is justified.
vennela - thank you also, however a little more fiber is needed in your diet. It will keep you a little more regular. It will help provide a little less tension in your work day...  |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Oct 13, 2004 11:26 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
One way to force a blocked get to return is to change the queue to get inhibited, the get will immediately return with a 2014 error.
The FAIL_IF_QUIESCING is designed to allow programs to shutdown gracefully when the queue manager is ended with the controlled option, applications get a period of time to complete their work and disconnect from the queue manager. After the time period is up, applications get disconnected immediately, all pending transactions are rolled back and all MQ calls fail. You can also end a queue manager immediately and get the same effect. |
|
Back to top |
|
 |
dustoff |
Posted: Wed Oct 13, 2004 12:47 pm Post subject: |
|
|
Newbie
Joined: 12 Oct 2004 Posts: 9
|
jlrowe wrote: |
One way to force a blocked get to return is to change the queue to get inhibited, the get will immediately return with a 2014 error.
|
Thanks for the tip. I tried this. Also had to open queue with MQOO_SET option. MQQueueManager.accessQueue() crashed with a 2035 - not authorized for access. It sounds like this may be my ticket if I can get a little more authorization from the queue owner.
Thanks! |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Oct 13, 2004 6:32 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
You don't need to call Hulk Hogan and hand him a sledge hammer, when all you need to do is drive a thumb tack into corkboard!
All this talk about inhibiting queues and quit messages just so you can stop the QM is unnecessary.
EddieA had the correct answer. Code the MQGMO_FAIL_IF_QUIESCING option, and you will be fine, as long as you are issuing endmqm with the -i option. Without -i, the endmqm command simply waits until all applications disconnect, which means it waits for your MQGET to end, and then waits for your app to MQCLOSE and MQDISC.
From the APG manual:
Code: |
If the queue manager enters the quiescing state, and you used the MQGMO_FAIL_IF_QUIESCING option, the wait is canceled and the MQGET call completes with the MQRC_Q_MGR_QUIESCING reason code. Without this option, the call remains waiting.
|
So code the option, use endmqm -i when ending the QM, and get on to more important things, like praying for the Red Sox to win.
 _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Oct 13, 2004 11:49 pm Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
But he's not trying to stop the QM, he merely wants to end a process which is blocked on a timed get from a Q. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Oct 14, 2004 3:53 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Aha. I reread his posts again. You're right. looks like a quit message or a disable of the queue is the only way to pull off what he is trying to do.
Don't know why I was thinking he was trying to stop the QM. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
dustoff |
Posted: Thu Oct 14, 2004 10:01 am Post subject: |
|
|
Newbie
Joined: 12 Oct 2004 Posts: 9
|
PeterPotkay wrote: |
Aha. I reread his posts again. You're right. looks like a quit message or a disable of the queue is the only way to pull off what he is trying to do.
Don't know why I was thinking he was trying to stop the QM. |
In my initial message, I mentioned that I had searched this forum and thought ( wrongly ) my problem to be similiar to issues people have without using FAIL_IF_QUIESCING option. I think the FAIL_IF_QUIESCING keyword initiaited the seperate discussion about stopping the QM. Sorry about that.
Thanks for all the help!
dustoff |
|
Back to top |
|
 |
|