Author |
Message
|
vsr |
Posted: Tue Apr 18, 2006 7:38 pm Post subject: Pub Sub |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
Hi every one ,
how can i publish different topics in a message flow ?
i tried publishing 2 topics like this
SET OutputRoot.MQRFH2.psc.Topic='Topic1';
SET OutputRoot.MQRFH2.psc.Command ='Publish';
SET OutputRoot.MQRFH2.psc.Topic ='Topic2';
SET OutputRoot.MQRFH2.psc.Command ='Publish';
and i subscribed 2 topics , but i am receving messages for the 'Topics2' only , when i commented out the last 2 commands , then i am getting messages for 'Topic1' ...
How can i subscribe both at a time ? can anyone help me ? |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Apr 18, 2006 7:42 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi vsr,
Your last two lines of code are overwriting the previous two lines of code.
You could try
Code: |
SET OutputRoot.MQRFH2.psc.Topic[1]='Topic1';
SET OutputRoot.MQRFH2.psc.Command[1] ='Publish';
SET OutputRoot.MQRFH2.psc.Topic[2] ='Topic2';
SET OutputRoot.MQRFH2.psc.Command[2] ='Publish'; |
Aren't you using the debugger ? you would have figured this out if you had been going through the code in debug mode.
Regards. |
|
Back to top |
|
 |
vsr |
Posted: Tue Apr 18, 2006 8:42 pm Post subject: Not working |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
Hi Elvis,
Thank u very much for ur immediate answer .
i tried in ur way , but this time i am not getting any message to any subscriber. And if i comment out one topic and if i give like this i am getting subscription for Topic1 message
SET OutputRoot.MQRFH2.psc.Topic[1]='Topic1';
SET OutputRoot.MQRFH2.psc.Command[1] ='Publish';
--SET OutputRoot.MQRFH2.psc.Topic[2] ='Topic2';
--SET OutputRoot.MQRFH2.psc.Command[2] ='Publish';
but when i take out the comments , i am not getting any subscription messages ... |
|
Back to top |
|
 |
EddieA |
Posted: Wed Apr 19, 2006 8:36 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Then I guess you need to look at PROPOGATE.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
vsr |
Posted: Thu Apr 20, 2006 4:16 pm Post subject: Still NOT working |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
I tried even PROPAGE , but i couldn't get the result ...
can't we publish more than one Topic ? we should , but i don't know how !
if anybody knows pls let me know |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 21, 2006 3:08 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Propagate would allow you to publish twice on one topic each.
If you tried it, and you didn't get what you wanted, you did something wrong - like try to publish twice on two topics each.
I've never considered publishing the same message on two topics - it's always seemed like a poor design of topic hierarchy to me.
That said, other people have tried this, and discussed it here before. A search, possibly for "two topics" might find those discussions. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|