Author |
Message
|
scravr |
Posted: Fri Oct 28, 2011 12:01 pm Post subject: List of Subscribers |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
Dose anyone know if there are JMS functions to get list of all Subscription-Names, Topic-String, Date/Time-of-last-msg, and Msg-Count from QM7 ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 28, 2011 12:34 pm Post subject: Re: List of Subscribers |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
scravr wrote: |
Dose anyone know if there are JMS functions to get list of all Subscription-Names, Topic-String, Date/Time-of-last-msg, and Msg-Count from QM7 ? |
Wouldn't you use MS0B for that?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Oct 28, 2011 12:36 pm Post subject: Re: List of Subscribers |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
scravr wrote: |
Dose anyone know if there are JMS functions to get list of all Subscription-Names, Topic-String, Date/Time-of-last-msg, and Msg-Count from QM7 ? |
Wouldn't you use MS0B for that?  |
You'd use the PCF classes that ship with MQ. This is NOT MS0B.
But otherwise, yes, this kind of administrative function is outside the scope of the JMS standard. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 28, 2011 1:26 pm Post subject: Re: List of Subscribers |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
fjb_saper wrote: |
scravr wrote: |
Dose anyone know if there are JMS functions to get list of all Subscription-Names, Topic-String, Date/Time-of-last-msg, and Msg-Count from QM7 ? |
Wouldn't you use MS0B for that?  |
You'd use the PCF classes that ship with MQ. This is NOT MS0B.
But otherwise, yes, this kind of administrative function is outside the scope of the JMS standard. |
Sorry forgot that it was part of the product in V7 _________________ MQ & Broker admin |
|
Back to top |
|
 |
scravr |
Posted: Wed Nov 02, 2011 6:24 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
PCF works great, but how can I get the "Message count" for each subscription. (as in MQExplorer Status) |
|
Back to top |
|
 |
zpat |
Posted: Wed Nov 02, 2011 6:37 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Is MS0B now obsolete or only related to v6? - the support pac page does not make this clear, and I caught one of my developers using it only today. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Nov 02, 2011 7:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I suspect you may have to both INQUIRE SUBSTATUS as well as INQUIRE SUB.
And, yes, MS0B is supplanted by the version shipped with MQ v7 and is not updated to cover v7 PCF commands. You shouldn't use MS0B against a v7 qmgr, as you won't be able to access any v7 functionality. |
|
Back to top |
|
 |
scravr |
Posted: Wed Nov 02, 2011 11:51 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
Not sure way but
...
...
PCFParameter [] pcfparameters = {new MQCFST (CMQCFC.MQCACF_SUB_NAME, "*")};
...
...
pcfresponses = pcfagent.send (CMQCFC.MQCMD_INQUIRE_SUBSCRIPTION, pcfparameters);
returns null for
....
getParameterName().compareToIgnoreCase("MQBACF_SUB_ID")
so I took the sub_id when getParameter()==7016 to a String
and is says
value=414d51204d4f5348455f3230313130350c88f24d200c1739
Then with this sub-id I am trying to get subscription status:
...
...
PCFMessage request = new PCFMessage (CMQCFC.MQCMD_INQUIRE_SUB_STATUS);
request.addParameter (CMQCFC.MQBACF_SUB_ID, SubID);
PCFMessage [] responses = pcfStatAgent.send(request);
the send(request) gets error 3015:
MQJE001: Completion Code '2', Reason '3015'.
Any ideas:
1. Way SUB_ID is null?
2. What is 3015 about? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 02, 2011 1:20 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
It's not the subid you want for the status ... it's the sub.
See mqsc dis sbstatus(*)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
scravr |
Posted: Thu Nov 03, 2011 7:04 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
Right; need to use MQCACF_SUB_NAME value to get status for last msg date/time and msg count.
Does IBM gives access to pub/sub topic/subscription maching function?
I need to match (in JAVA/JMS/JNDI appl) the MQtopic on an incomming msg to a list of subscription's topic-string.
Like to use (if possible) the IBM matching function. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 03, 2011 8:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
scravr wrote: |
Right; need to use MQCACF_SUB_NAME value to get status for last msg date/time and msg count.
Does IBM gives access to pub/sub topic/subscription maching function?
I need to match (in JAVA/JMS/JNDI appl) the MQtopic on an incomming msg to a list of subscription's topic-string.
Like to use (if possible) the IBM matching function. |
Have you tried using:
Code: |
where (topicstr lk 'mytopic/subtopic/*') |
?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
scravr |
Posted: Thu Nov 03, 2011 8:11 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
what this means: "where (topicstr lk 'mytopic/subtopic/*')"
I am looking for the MQ Published TopicString and Subsciptions TopicString matching function name/location/JAR..... and how to call it in JAVA. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 03, 2011 8:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
scravr wrote: |
what this means: "where (topicstr lk 'mytopic/subtopic/*')"
I am looking for the MQ Published TopicString and Subsciptions TopicString matching function name/location/JAR..... and how to call it in JAVA. |
Code: |
dis sub(*) where (topicstr lk 'mytopic/subtopic/*') |
Call the equivalent in pcf! _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Nov 03, 2011 8:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The matching function you are looking for is "=".
Or perhaps ".equals()". |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 03, 2011 8:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
The matching function you are looking for is "=".
Or perhaps ".equals()". |
But "=" only gives you the exact matching topic string... not the wildcards.
This is why I was looking for "like" ... _________________ MQ & Broker admin |
|
Back to top |
|
 |
|