Author |
Message
|
cvrachak |
Posted: Mon Nov 14, 2005 3:38 pm Post subject: Getting the Queue Depth when it is shared in a cluster |
|
|
Novice
Joined: 06 Jul 2002 Posts: 17
|
Hi how to get the current depth of a queue shared in a cluster. getting a 2068 error when trying to do it. able to get the depth when the queue is not shared in the cluster.
"CompCode: 1, Reason: 2068"
mqQMgr = new MQQueueManager( textBox1.Text );
mqQueue = mqQMgr.AccessQueue( textBox2.Text,
MQC.MQOO_FAIL_IF_QUIESCING |
MQC.MQOO_INPUT_SHARED |
MQC.MQOO_INQUIRE
);
int iQDepth = 0;
try
{
iQDepth = mqQueue.CurrentDepth;
}
catch ( MQException exp )
{
string str = exp.Message;
iQDepth = 0;
}
appreciate your help. using WebSphere MQ 5.3 CSD 7
here is the stack trace
at IBM.WMQ.MQBaseObject.throwNewMQException(Int32 compCode, Int32 reason)\r\n
at IBM.WMQ.MQManagedObject.Inquire(Int32[] selectors, Int32[] intAttrs, Byte[] charAttrs)\r\n
at IBM.WMQ.MQManagedObject.QueryAttribute(Int32 attributeType)\r\n
at IBM.WMQ.MQQueue.get_CurrentDepth()\r\n
at MyWinApp.Form1.test() in
c:\\users\\projects\\mysln\\mywinapp\\form1.cs:line 213 |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Nov 14, 2005 4:52 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
My guess is that this is a queue that is not local to the queue manager you are connected to? |
|
Back to top |
|
 |
cvrachak |
Posted: Mon Nov 14, 2005 9:27 pm Post subject: |
|
|
Novice
Joined: 06 Jul 2002 Posts: 17
|
The Queue is Local Queue. When the Queue is not shared in Cluster everything looks good, only when it is shared in the cluster, it is giving this 2068 error.
Thanks
Chandra Sekhar |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Nov 15, 2005 1:03 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
are there multiple instances of this queue in the cluster? if so, then it is not guaranteed that you inquire gets the local instance. _________________ Regards, Butcher |
|
Back to top |
|
 |
wschutz |
Posted: Tue Nov 15, 2005 2:46 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Does it work if you specify both the ObjectName and ObjectQMgrName on the MQOPEN call for the mqinq when inquiring on a local queue? _________________ -wayne |
|
Back to top |
|
 |
EddieA |
Posted: Tue Nov 15, 2005 9:15 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
then it is not guaranteed that you inquire gets the local instance. |
It is, prior to v6.
Cheersw, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
JT |
Posted: Tue Nov 15, 2005 10:10 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
mqQueue = mqQMgr.AccessQueue( textBox2.Text,
MQC.MQOO_FAIL_IF_QUIESCING |
MQC.MQOO_INPUT_SHARED |
MQC.MQOO_INQUIRE
); |
Did you try this recommendation:
|
|
Back to top |
|
 |
|