|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Publish/Subscribe utility |
« View previous topic :: View next topic » |
Author |
Message
|
nilendu |
Posted: Thu Mar 26, 2009 7:46 am Post subject: Publish/Subscribe utility |
|
|
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 |
|
 |
nilendu |
Posted: Thu Mar 26, 2009 2:11 pm Post subject: |
|
|
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 |
|
 |
Jade Harv |
Posted: Thu Mar 26, 2009 4:02 pm Post subject: |
|
|
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
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|