|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Finding QueueDepth using MQJMS.. |
« View previous topic :: View next topic » |
Author |
Message
|
eswarnv |
Posted: Fri Jul 05, 2002 3:54 am Post subject: Finding QueueDepth using MQJMS.. |
|
|
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 |
|
 |
harwinderr |
Posted: Sun Jul 07, 2002 9:16 pm Post subject: |
|
|
 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 |
|
 |
eswarnv |
Posted: Mon Jul 08, 2002 5:07 am Post subject: |
|
|
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 |
|
 |
bower5932 |
Posted: Tue Jul 09, 2002 6:52 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|