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 queue depth of MQ 7

Post new topic  Reply to topic
 Finding queue depth of MQ 7 « View previous topic :: View next topic » 
Author Message
jalexmichaelraj
PostPosted: Wed Dec 04, 2013 10:12 pm    Post subject: Finding queue depth of MQ 7 Reply with quote

Novice

Joined: 04 Dec 2013
Posts: 10

I am trying to find the queue depth for my queue and below is the code which is working fine for MQ 6 server. But when i use for mq 7, it gives me exception

Code:
public static void getQueueDepth()
{
            String qManager="Q-Manager";
    int port_num=1434;
    int openOptions =  CMQC.MQOO_FAIL_IF_QUIESCING + CMQC.MQOO_INPUT_SHARED + CMQC.MQOO_INQUIRE;

    try {
            Hashtable props = new Hashtable();

            props.put(CMQC.HOST_NAME_PROPERTY, "IP_Addresss");
            props.put(CMQC.PORT_PROPERTY, port_num);
            props.put(CMQC.CHANNEL_PROPERTY, "Channel Name");

            MQQueueManager qMgr = new MQQueueManager(qManager, props);

            MQQueue destQueue = qMgr.accessQueue("Queue_Name",   openOptions);

            System.out.println("E_RETRY size:" + destQueue.getCurrentDepth());
            destQueue.close();
            qMgr.disconnect();
    }catch(MQException mqe){
        System.out.println(mqe);
    }
}



it gives me exception on the line

Code:
 System.out.println("E_RETRY size:" + destQueue.getCurrentDepth());


on the method
Code:
getCurrentDepth()


Exception Msg --
Code:
MQJE001: Completion Code 1, Reason 2068 com.ibm.mq.MQException: MQJE001: Completion Code 1, Reason 2068


Kindly help me..
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Dec 04, 2013 11:28 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Code:

C:\Users\numpty>mqrc 2068

      2068  0x00000814  MQRC_SELECTOR_NOT_FOR_TYPE

C:\Users\numpty>

_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
jalexmichaelraj
PostPosted: Thu Dec 05, 2013 1:34 am    Post subject: Reply with quote

Novice

Joined: 04 Dec 2013
Posts: 10

smdavies99 wrote:
Code:

C:\Users\numpty>mqrc 2068

      2068  0x00000814  MQRC_SELECTOR_NOT_FOR_TYPE

C:\Users\numpty>


Sorry I dint understand your post.. To make clear I need to get the Queue Depth in java program
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Dec 05, 2013 2:53 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I was pointing out the text of the error you are seeing. This error is documented.
Also, the 'mqrc' utility is very useful for turning the error number into some text.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
jalexmichaelraj
PostPosted: Thu Dec 05, 2013 3:14 am    Post subject: Reply with quote

Novice

Joined: 04 Dec 2013
Posts: 10

kk.. now i understood.. I have browsed in the internet regarding that error and have also changed it
Code:
CMQC.MQOO_FAIL_IF_QUIESCING + CMQC.MQOO_INPUT_SHARED + CMQC.MQOO_INQUIRE+CMQC.MQOO_BROWSE;


but it gives the same error message..
Code:
MQJE001: Completion Code 1, Reason 2068 com.ibm.mq.MQException: MQJE001: Completion Code 1, Reason 2068

smdavies99 wrote:
I was pointing out the text of the error you are seeing. This error is documented.
Also, the 'mqrc' utility is very useful for turning the error number into some text.
Back to top
View user's profile Send private message
manoj5007
PostPosted: Thu Dec 05, 2013 3:31 am    Post subject: Reply with quote

Acolyte

Joined: 15 May 2013
Posts: 64

Check whether the queue for which you want the depth is a local queue ..

The error messages means that the queue depth is not a attribute for the queue in use
i.e. if the queue is remote or a alias queue you won't have any queue depth.
Back to top
View user's profile Send private message
jalexmichaelraj
PostPosted: Thu Dec 05, 2013 3:39 am    Post subject: Reply with quote

Novice

Joined: 04 Dec 2013
Posts: 10

its not a local queue.. its a remote,,.. server is in other location..


manoj5007 wrote:
Check whether the queue for which you want the depth is a local queue ..

The error messages means that the queue depth is not a attribute for the queue in use
i.e. if the queue is remote or a alias queue you won't have any queue depth.
Back to top
View user's profile Send private message
manoj5007
PostPosted: Thu Dec 05, 2013 4:31 am    Post subject: Reply with quote

Acolyte

Joined: 15 May 2013
Posts: 64

As you are aware that remote queues are always a remote definition of local queue and so can't hold any messages, there won't be any queue depth for remote queues.
Back to top
View user's profile Send private message
jalexmichaelraj
PostPosted: Thu Dec 05, 2013 4:39 am    Post subject: Reply with quote

Novice

Joined: 04 Dec 2013
Posts: 10

but how come I am able to get the Queue depth for the MQ 6.. which is the same one

manoj5007 wrote:
As you are aware that remote queues are always a remote definition of local queue and so can't hold any messages, there won't be any queue depth for remote queues.
Back to top
View user's profile Send private message
manoj5007
PostPosted: Thu Dec 05, 2013 8:54 pm    Post subject: Reply with quote

Acolyte

Joined: 15 May 2013
Posts: 64

[quote]but how come I am able to get the Queue depth for the MQ 6.. which is the same one [/quote]

I am not sure whether you have understood what I meant by remote queue here,

Is your queue a local queue in your remote queue manager or a remote queue in your remote queue manager?

And also check whether the properties of the queue in MQ 7 is same as the queue in MQ 6.
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 Java / JMS » Finding queue depth of MQ 7
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.