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 Java / JMS » Finding QueueDepth using MQJMS..

Post new topic  Reply to topic
 Finding QueueDepth using MQJMS.. « View previous topic :: View next topic » 
Author Message
eswarnv
PostPosted: Fri Jul 05, 2002 3:54 am    Post subject: Finding QueueDepth using MQJMS.. Reply with quote

Voyager

Joined: 20 Dec 2001
Posts: 88

Hi

I have a requirement of finding queueDepth from my JMS client. I guess there is no such method existed in JMS API. Can anybody help me in this regard. thanks in advance.

thanks
eswar
Back to top
View user's profile Send private message
harwinderr
PostPosted: Sun Jul 07, 2002 9:16 pm    Post subject: Reply with quote

Voyager

Joined: 29 Jan 2002
Posts: 90

I guess for finding the queue depth you can use the getCurrentDepth() method which returns an integer referring to the number of messages on the queue.

The following code may help :-

qmgr = new MQQueueManager(qMgrName1);
// Open it for inquire so that we can get the current depth.
int openOptions = MQC.MQOO_INQUIRE;
q = qmgr.accessQueue(queueName, openOptions, null, null, null);
// Find out how many messages are left on the queue
int depth = q.getCurrentDepth();
// Not doing this can cause a lot of grief!
qmgr.disconnect();

I hope I have understood your problem correctly.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
eswarnv
PostPosted: Mon Jul 08, 2002 5:07 am    Post subject: Reply with quote

Voyager

Joined: 20 Dec 2001
Posts: 88

hi,

My requirement is to find depth by using "JMS Client" ( MQJMS)., not using MQ base application.


thanks
eswar
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Jul 09, 2002 6:52 am    Post subject: Reply with quote

Jedi Knight

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

You can't get the queue depth with the JMS classes. I don't think there is anything in the JMS spec regarding this. Probably a future enhancement?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Finding QueueDepth using MQJMS..
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.