Author |
Message
|
jalexmichaelraj |
Posted: Wed Dec 04, 2013 10:12 pm Post subject: Finding queue depth of MQ 7 |
|
|
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
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 |
|
 |
smdavies99 |
Posted: Wed Dec 04, 2013 11:28 pm Post subject: |
|
|
 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 |
|
 |
jalexmichaelraj |
Posted: Thu Dec 05, 2013 1:34 am Post subject: |
|
|
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 |
|
 |
smdavies99 |
Posted: Thu Dec 05, 2013 2:53 am Post subject: |
|
|
 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 |
|
 |
jalexmichaelraj |
Posted: Thu Dec 05, 2013 3:14 am Post subject: |
|
|
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 |
|
 |
manoj5007 |
Posted: Thu Dec 05, 2013 3:31 am Post subject: |
|
|
 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 |
|
 |
jalexmichaelraj |
Posted: Thu Dec 05, 2013 3:39 am Post subject: |
|
|
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 |
|
 |
manoj5007 |
Posted: Thu Dec 05, 2013 4:31 am Post subject: |
|
|
 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 |
|
 |
jalexmichaelraj |
Posted: Thu Dec 05, 2013 4:39 am Post subject: |
|
|
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 |
|
 |
manoj5007 |
Posted: Thu Dec 05, 2013 8:54 pm Post subject: |
|
|
 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 |
|
 |
|