ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » [Solved]Occasionally receiving MQRC_NO_MSG_AVAILABLE

Post new topic  Reply to topic
 [Solved]Occasionally receiving MQRC_NO_MSG_AVAILABLE « View previous topic :: View next topic » 
Author Message
jmeier
PostPosted: Wed Dec 18, 2002 7:52 am    Post subject: [Solved]Occasionally receiving MQRC_NO_MSG_AVAILABLE Reply with quote

Apprentice

Joined: 30 Aug 2002
Posts: 46
Location: Minneapolis

I have a VB application running on a WIN 2000 server. The application occasionally throws the "MQRC_NO_MSG_AVAILABLE" error. There are messages on the queue. I check for queue depth in order to process and I use the following on the get:

Set oMsg = MQSess.AccessMessage
Set oMsgOptions = MQSess.AccessGetMessageOptions
oMsgOptions.Options = oMsgOptions.Options & MQAX200.MQ.MQGMO_FAIL_IF_QUIESCING & MQAX200.MQ.MQGMO_SYNCPOINT
GetMQQueue.Get oMsg, oMsgOptions
Set putMsg = MQSess.AccessMessage
Set pMsgOptions = MQSess.AccessPutMessageOptions
pMsgOptions.Options = pMsgOptions.Options Or 0

What are some of the reasons that I could be receiving this error. As I mentioned, this error occurs only occasionally, maybe once or twice a week. We haven't gone into production yet, so I am somewhat concerned that we may see this happen in a production environment.

Any help would be appreciated...
_________________
Joe Meier


Last edited by jmeier on Wed Mar 05, 2003 1:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
mqonnet
PostPosted: Wed Dec 18, 2002 8:18 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

What exactly you mean by " I check for queue depth in order to process and I use the following on the get: ". Does it mean you check the curdepth through your app before you do a get. Sounds quite odd.
But otherwise, if you are just doing a regular get. There could be loads of reasons for you getting 2033. And all these could very well be timing related. A couple of very common reasons.
1) Message has not committed yet.
2) You did not wait long enough before doing a get(by the way, i dont see any waits on gets.... so is it a no_waited get??).


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
View user's profile Send private message Send e-mail Visit poster's website
jmeier
PostPosted: Wed Dec 18, 2002 8:25 am    Post subject: Reply with quote

Apprentice

Joined: 30 Aug 2002
Posts: 46
Location: Minneapolis

Here is how the gets are coded including qdepth check:

Set MQSess = New MQAX200.MQSession
'create MQ Session
Set GetMQQueue = New MQAX200.MQQueue
Set MQQueueMgr = MQSess.AccessQueueManager("")
'-- App.LogEvent "Clarify Workflow interface Connected to Queue Manager", 4
Set GetMQQueue = MQQueueMgr.AccessQueue("CIM.CLARIFY", _
MQAX200.MQ.MQOO_BROWSE Or MQAX200.MQ.MQOO_INQUIRE Or MQAX200.MQ.MQOO_INPUT_SHARED)
'-- App.LogEvent "Clarify Workflow interface Connected to Queue", 4
Do While GetMQQueue.CurrentDepth > 0
Set oMsg = MQSess.AccessMessage
Set oMsgOptions = MQSess.AccessGetMessageOptions
oMsgOptions.Options = oMsgOptions.Options & MQAX200.MQ.MQGMO_FAIL_IF_QUIESCING & MQAX200.MQ.MQGMO_SYNCPOINT
GetMQQueue.Get oMsg, oMsgOptions
Set putMsg = MQSess.AccessMessage
Set pMsgOptions = MQSess.AccessPutMessageOptions
pMsgOptions.Options = pMsgOptions.Options Or 0 'Or MQAX200.MQ.MQPER_PERSISTENT


Explain to me a little about timing...
Thanks.
_________________
Joe Meier
Back to top
View user's profile Send private message
mqonnet
PostPosted: Wed Dec 18, 2002 8:36 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

As i mentioned earlier, you are using CurrentDepth to figure out if you have messages available or not. But you have to bear in mind that CurrentDepth DOES ALSO ACCOUNT for UNCOMMITTED messages. Which means messages that are put on queue, but not yet available to be got still count in curdepth. So, the condition out there using CurrentDepth gets satisfied, but the GET fails with 2033.
If you still want to go with the above logic of your app. Then remove SYNCPOINT in both put and get apps and it should work fine.

Timing means, the interval between a put is issued, the message making it to the queue, the put getting committed, the get being issued, get locating an available message and getting it. You yourself could figure out how much time lag is there between all these operations. I know that this whole process might be in nano seconds but still one operation coming before other causes issues like 2033 you are facing.

Hope this helps.

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
View user's profile Send private message Send e-mail Visit poster's website
jmeier
PostPosted: Wed Dec 18, 2002 8:50 am    Post subject: Reply with quote

Apprentice

Joined: 30 Aug 2002
Posts: 46
Location: Minneapolis

Thanks Kumar that helps a lot!!!
_________________
Joe Meier
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » [Solved]Occasionally receiving MQRC_NO_MSG_AVAILABLE
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.