Author |
Message
|
Fuzzy_mq |
Posted: Tue Nov 07, 2006 2:57 pm Post subject: WaitInterval not working as expected!! |
|
|
Apprentice
Joined: 27 May 2004 Posts: 31 Location: US
|
All,
My problem is MQGet continues to wait till the waitinterval value and does not exit when the message arrives. I searched the forum and found the same issue :
http://www.mqseries.net/phpBB2/viewtopic.php?t=28452&highlight=mqgmowait
Jeff says - You're probably forgetting to clear the Message ID and CorrId before you issue your get.
Could you tell me how do I go about clearing the Message and CorrIds?
In our send/receive program, we send the messages, store the MessageId in a variable. Then use that Id to retrieve the reply message.
Here are the Get options that I am using:
MQC.MQGMO_FAIL_IF_QUIESCING
+ MQC.MQGMO_WAIT
+ MQC.MQGMO_LOGICAL_ORDER
+ MQC.MQMO_MATCH_CORREL_ID;
Thanks,
Suchit |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 07, 2006 3:33 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The basic pattern for request/reply is that the reply message will have the correlation ID set to the message ID of the request message.
So you may simply be waiting for the wrong thing.
Otherwise, you want the MQCI_NONE and MQMI_NONE constant values. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
zpat |
Posted: Wed Nov 08, 2006 12:20 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
You need to set your correlid variable to the value of your request message msgid before issuing the MQGET.
The server end must reply with the reply correlid set from the request message's msgid. |
|
Back to top |
|
 |
Fuzzy_mq |
Posted: Wed Nov 08, 2006 7:50 am Post subject: |
|
|
Apprentice
Joined: 27 May 2004 Posts: 31 Location: US
|
Thanks for your replies.
Yes, reply message is setting correlation ID with the message ID of the request message. The correct reply message does get read, but after the max interval.
Thanks,
Suchit |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Nov 08, 2006 7:56 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Just for grins and giggles try it without
Code: |
+ MQC.MQGMO_LOGICAL_ORDER |
What version of MQ and what CSD level are you on?
What version of the Operating system? |
|
Back to top |
|
 |
zpat |
Posted: Wed Nov 08, 2006 7:59 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Don't add values for Match Options to the variable used for Get Options value. They are different things.
You might add the MQGMO_CONVERT though for good measure |
|
Back to top |
|
 |
mvic |
Posted: Wed Nov 08, 2006 9:40 am Post subject: Re: WaitInterval not working as expected!! |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Fuzzy_mq wrote: |
Here are the Get options that I am using:
MQC.MQGMO_FAIL_IF_QUIESCING
+ MQC.MQGMO_WAIT
+ MQC.MQGMO_LOGICAL_ORDER
+ MQC.MQMO_MATCH_CORREL_ID; |
MQMO_MATCH_CORREL_ID goes in the MD.MatchOptions not the GMO.Options. |
|
Back to top |
|
 |
|