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 » IBM MQ API Support » Getting the Queue Depth when it is shared in a cluster

Post new topic  Reply to topic
 Getting the Queue Depth when it is shared in a cluster « View previous topic :: View next topic » 
Author Message
cvrachak
PostPosted: Mon Nov 14, 2005 3:38 pm    Post subject: Getting the Queue Depth when it is shared in a cluster Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Mon Nov 14, 2005 4:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
cvrachak
PostPosted: Mon Nov 14, 2005 9:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mr Butcher
PostPosted: Tue Nov 15, 2005 1:03 am    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Tue Nov 15, 2005 2:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
EddieA
PostPosted: Tue Nov 15, 2005 9:15 am    Post subject: Reply with quote

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
View user's profile Send private message
JT
PostPosted: Tue Nov 15, 2005 10:10 am    Post subject: Reply with quote

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:

In this post: http://www.mqseries.net/phpBB2/viewtopic.php?t=4037, PeterPotkay wrote:
You have to open it with the SET and INQUIRE options if it is a cluster queue if you want to get the depth.
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 » IBM MQ API Support » Getting the Queue Depth when it is shared in a cluster
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.