|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Double Instance Queue Reader Failing - 2034 |
« View previous topic :: View next topic » |
Author |
Message
|
HonestBroker |
Posted: Thu Apr 17, 2014 7:09 am Post subject: Double Instance Queue Reader Failing - 2034 |
|
|
Newbie
Joined: 30 Mar 2011 Posts: 8
|
I have a queue-reader application written in C which runs two instances and has been processing many thousands of messages per day for many years without issue.
The input queue is a local queue on a local instance of the queue manager (V7.0.1.3).
Recently the unix environment (Solaris 10) has been reorganised and moved to VM. The queue manager and queues now are on one vm and the queue reader and processing applications are on another.
The queue reader has been recompiled to use client libraries to connect to the input queue.
I have noticed that now, on occasion, the two instances crash, with one logging a 2034 error – No Message Under Cursor.
The interaction with the queue in the code is summarised below along with the various options selected.
Essentially each instance of the queue reader opens a handle to the input queue, then loops while browsing with a wait interval of 15 sec.s. When a message is browsed, it is locked and a destructive Get performed, with Syncpoint. It is at this point that the 2034 is received.
The move to client MQ libraries rather than server MQ libraries is the change here.
Would this behaviour be expected or explained by such a change?
Is there a remedy?
Code: |
aMQVarsInfo.MQ_OpenOptionQue =MQOO_INPUT_SHARED + MQOO_BROWSE + MQOO_FAIL_IF_QUIESCING;
MQOPEN()
Loop
paMQVarsInfo->MQ_gmo.Options = MQGMO_WAIT + MQGMO_CONVERT + MQGMO_BROWSE_FIRST + MQGMO_LOCK + MQGMO_ACCEPT_TRUNCATED_MSG;
paMQVarsInfo->MQ_gmo.WaitInterval = WAITINTERVAL;
MQGET()
IF paMQVarsInfo->MQ_Messlen > 0
paMQVarsInfo->MQ_gmo.Options = MQGMO_CONVERT + MQGMO_MSG_UNDER_CURSOR + MQGMO_SYNCPOINT;
MQGET()
|
|
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 17, 2014 7:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Is the browse really necessary?
Why not immediately do an MQGET under syncpoint?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
HonestBroker |
Posted: Thu Apr 17, 2014 7:30 am Post subject: |
|
|
Newbie
Joined: 30 Mar 2011 Posts: 8
|
I actually recompiled a version to do that this morning and (probably the way I did it but) it didn't observe the wait and it didn't actually Get the message off the queue. Maybe the cursor is off?
What GMO options would you suggest to do a destructive Get, in a loop? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 17, 2014 7:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
HonestBroker wrote: |
I actually recompiled a version to do that this morning and (probably the way I did it but) it didn't observe the wait and it didn't actually Get the message off the queue. Maybe the cursor is off?
What GMO options would you suggest to do a destructive Get, in a loop? |
Make sure you clear the key fields each start of loop (msgid, correlid, etc...)
(or set them to mqmid_none, mqcid_none etc...)
As options: open for input, shared, syncpoint, wait, wait interval (something appropriate)...
Hope this helps  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tczielke |
Posted: Thu Apr 17, 2014 7:41 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
|
Back to top |
|
 |
HonestBroker |
Posted: Thu Apr 17, 2014 8:37 am Post subject: |
|
|
Newbie
Joined: 30 Mar 2011 Posts: 8
|
Quote: |
Make sure you clear the key fields each start of loop (msgid, correlid, etc...)
(or set them to mqmid_none, mqcid_none etc...)
As options: open for input, shared, syncpoint, wait, wait interval (something appropriate)... |
I had already been taking care or the msgid and correlid etc.
Thank you kindly for taking the time and interest to respond so quickly and positively to this post. I now have an approach to consider and test.
Quote: |
Something else to consider for the robustness of your client application. Did you include Automatic Client Reconnection when you converted your C app from a Server to a Client application? |
I'll be sure to consider this aspect also. Thank you too. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|