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 » List of Subscribers

Post new topic  Reply to topic Goto page 1, 2  Next
 List of Subscribers « View previous topic :: View next topic » 
Author Message
scravr
PostPosted: Fri Oct 28, 2011 12:01 pm    Post subject: List of Subscribers Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
fjb_saper
PostPosted: Fri Oct 28, 2011 12:34 pm    Post subject: Re: List of Subscribers Reply with quote

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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Oct 28, 2011 12:36 pm    Post subject: Re: List of Subscribers Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Oct 28, 2011 1:26 pm    Post subject: Re: List of Subscribers Reply with quote

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
View user's profile Send private message Send e-mail
scravr
PostPosted: Wed Nov 02, 2011 6:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
zpat
PostPosted: Wed Nov 02, 2011 6:37 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Nov 02, 2011 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message
scravr
PostPosted: Wed Nov 02, 2011 11:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
fjb_saper
PostPosted: Wed Nov 02, 2011 1:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
scravr
PostPosted: Thu Nov 03, 2011 7:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
fjb_saper
PostPosted: Thu Nov 03, 2011 8:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
scravr
PostPosted: Thu Nov 03, 2011 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
fjb_saper
PostPosted: Thu Nov 03, 2011 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Nov 03, 2011 8:13 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The matching function you are looking for is "=".

Or perhaps ".equals()".
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 03, 2011 8:15 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » List of Subscribers
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.