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 » Publish/Subscribe utility

Post new topic  Reply to topic
 Publish/Subscribe utility « View previous topic :: View next topic » 
Author Message
nilendu
PostPosted: Thu Mar 26, 2009 7:46 am    Post subject: Publish/Subscribe utility Reply with quote

Novice

Joined: 14 Sep 2006
Posts: 16

Hi All,

Hi seniors....

I am working on a pub/sub utility that uses PFC message to register and deregister subscribers to a topic.

I format a MQPSCommand RegSub and MQPSCommand DeregSub and achieve this.
Now I need to add a functionality to list the existing subscribers to a topic.

Can you guys please suggest me how to implement this?
I dont see any option to MQPSCommand that returns the list of subscribers.

Regards,
Nilendu
Back to top
View user's profile Send private message
nilendu
PostPosted: Thu Mar 26, 2009 2:11 pm    Post subject: Reply with quote

Novice

Joined: 14 Sep 2006
Posts: 16

Hi guys,

Just wanted to correct few typos in my previous post. I am using PCF messages and not PFC messages.

Also here is the code snippet where I format the PCF command.

---------------------
try{
boolean flag = s4.equals("add");
if(flag)
{
System.out.println("<" + s + ">\t <" + s2 + ">");
stringbuffer = new StringBuffer("MQPSCommand RegSub");
} else
{
System.out.println("<" + s + ">\t <" + s2 + ">");
stringbuffer = new StringBuffer("MQPSCommand DeregSub");
}
stringbuffer.append(" MQPSTopic ");
stringbuffer.append(s);
if(s1 != null)
{
stringbuffer.append(" MQPSStreamName ");
stringbuffer.append(s1);
}
if(s3 != null)
{
stringbuffer.append(" MQPSQMgrName ");
stringbuffer.append(s3);
}
stringbuffer.append(" MQPSQName ");
stringbuffer.append(s2);
for(; stringbuffer.length() % 16 != 0; stringbuffer.append(" ")) { }
int i = sendBrokerCommand(stringbuffer.toString(), null);
...................



I am not sure how to list existing subscribers for a topic using PCF message.
Any other method of finding the subscriber list is also fine by me.

Please suggest!!!

Regards,
Nilendu
Back to top
View user's profile Send private message
Jade Harv
PostPosted: Thu Mar 26, 2009 4:02 pm    Post subject: Reply with quote

Newbie

Joined: 26 Mar 2009
Posts: 3

Nilendu ,

Hope you dont mind my answer - as you have addressed to seniors , i am just a newbie

Quote:
Hi seniors....


Googling for your code snippet lead to me dumpbroker.java sample IBM code - so have you "tried" searching for this too ?

Anyways here goes the senior's answers

RTFM

Harv
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 » Publish/Subscribe utility
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.