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 » getCurrentDepth() not working (java)

Post new topic  Reply to topic
 getCurrentDepth() not working (java) « View previous topic :: View next topic » 
Author Message
mig
PostPosted: Thu May 16, 2002 4:42 am    Post subject: getCurrentDepth() not working (java) Reply with quote

Newbie

Joined: 16 May 2002
Posts: 2

Hi all,
I have problems to find out how many messages are currently in my queue. After looking in the API I found the MQQueue.getCurrentDepth() method but it always throws an exception.
Is this the right method to use to find out how many messages are in the queue or is there another way? If it's the right one, what should I check to ensure that the method works fine?
Thanks in advance for your help!
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu May 16, 2002 2:42 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

It works fine for me. What kind of exception are you getting? If it is a 2038, then you need to open the queue for inquire:

int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_INQUIRE;
MQQueue myQueue = qMgr.accessQueue(myQname, openOptions, null, null, null);
System.out.println("Curdepth = " + myQueue.getCurrentDepth());
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
mig
PostPosted: Fri May 17, 2002 6:49 am    Post subject: Reply with quote

Newbie

Joined: 16 May 2002
Posts: 2

thanks for your help, I opened the queue without the MQC.MQOO_INQUIRE flag and finally this seemed to be the problem.
I tried with MQC.MQOO_INQUIRE and everything works fine.

Thanks for your rapid help!
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 » getCurrentDepth() not working (java)
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.