Author |
Message
|
rkford11 |
Posted: Tue Oct 19, 2004 9:47 am Post subject: Pub/Sub in message flow |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
This question is simple but its confusing for me.
I have 4 different message flows, which have same input queue and the message for these flows is published under 4 different topics
(public group) to 4 different susbcriber queues. i also have 4 different subscription points for these publishing nodes. My question is
when ever i put a message in the input queue, to which subscriber queue the message is going to go.
Do we mention anything about topic or subscription in the application which has to put the message or which is going to use the message.
Do we have to change any properties for the message header by including a compute node between input and publication node
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 19, 2004 10:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes to all of your questions.
The publisher has to specify a topic. The subscriber has to specify a topic.
A published message goes to ALL subscriber queues (it's a one-to-many).
You use the compute node to specify the topic. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rkford11 |
Posted: Tue Oct 19, 2004 10:31 am Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
jefflowrey wrote: |
Yes to all of your questions.
The publisher has to specify a topic. The subscriber has to specify a topic.
A published message goes to ALL subscriber queues (it's a one-to-many).
You use the compute node to specify the topic. |
Thanks Jefflowrey
we can also define topics using the workbench apart from using the compute node. |
|
Back to top |
|
 |
RocknRambo |
Posted: Tue Oct 19, 2004 12:56 pm Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
Quote: |
we can also define topics using the workbench apart from using the compute node. |
can u pls eloborate this!!...how can we do this??
-RR |
|
Back to top |
|
 |
rkford11 |
Posted: Tue Oct 19, 2004 3:08 pm Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
RocknRambo wrote: |
Quote: |
we can also define topics using the workbench apart from using the compute node. |
can u pls eloborate this!!...how can we do this??
-RR |
In the Broker Administration Perspective, under the broker click on Topics. Once the topics window is opened, right click - New - create Topic.
Once you have defined topic you can give the ACL's for the topic. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 19, 2004 3:34 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That doesn't allow a message to be published under a particular topic.
All it does is assign security to a particular topic, if a message happens to be published under that topic.
You have to use ESQL or other code to assign a topic to a particular message before it is published.
I should be a little clearer about my earlier statement.
A published message goes to every queue that has a subscription for the topic it is published under, and otherwise fits the subscription criteria.
So if I have a queue subscribed to Topic A, and two queues subscribed to Topic B, I will get one copy of every message published to Topic A, and two copies of every message published to Topic B - and I will never see messages for Topic B on the Topic A queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rkford11 |
Posted: Tue Oct 19, 2004 6:50 pm Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
jefflowrey wrote: |
That doesn't allow a message to be published under a particular topic.
All it does is assign security to a particular topic, if a message happens to be published under that topic.
You have to use ESQL or other code to assign a topic to a particular message before it is published.
I should be a little clearer about my earlier statement.
A published message goes to every queue that has a subscription for the topic it is published under, and otherwise fits the subscription criteria.
So if I have a queue subscribed to Topic A, and two queues subscribed to Topic B, I will get one copy of every message published to Topic A, and two copies of every message published to Topic B - and I will never see messages for Topic B on the Topic A queue. |
Hi Jeffolowrey,
Correct me if i am wrong. I have created topic as i described above. Then i created a flow using MQinput and publishing nodes. I have mentioned the topic in the default properties of MQinput node. Then i registered two subscribers using IA71 utility. now when i put a test message on the input queue i get the message on the two subscriber queues.
here is where i had a problem, when i have 2 different flows with same input queue but 2 different subscription points for the 2 flows. so now when i put the test message one of the flows is getting clicked.here is where i had a question whether we mention topic name in the publishing application.
When you say to include ESQL code do you mean by this
SET Root.MQRFH2.psc.Topic = " Topic";
if possible please post the code to assign topic to message before it is published.
do we have to definitely include a compute node to assign topic to a message.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 20, 2004 4:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No, it looks like the MQInput node has been changed in version 5 to allow for specification of a default Topic.
That means that if you do as you've said, you don't need to use ESQL or a Compute node to specify the topic.
I really need to spend some time reading the manuals!  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rkford11 |
Posted: Wed Oct 20, 2004 8:17 am Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
jefflowrey wrote: |
No, it looks like the MQInput node has been changed in version 5 to allow for specification of a default Topic.
That means that if you do as you've said, you don't need to use ESQL or a Compute node to specify the topic.
I really need to spend some time reading the manuals!  |
MQInput node has not been changed in version 5. I am talking about Topic column under Default tab of the node.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 20, 2004 9:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
rkford11 wrote: |
MQInput node has not been changed in version 5. I am talking about Topic column under Default tab of the node.
Thanks |
Yes.
I don't remember there being a Topic column on the Default tab of the MQInput node in version 2.1.
Maybe it was there, then, as well. But I don't remember it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jrjoe |
Posted: Mon Nov 29, 2004 6:30 am Post subject: |
|
|
Acolyte
Joined: 20 Jan 2003 Posts: 60
|
I was wondering if with version 5 I can put a message to an MQInput Node without the MQRFH header and connect it to a Publish Node.
Will the Publish Node add the MQRFH header ?
Where do I define the Topic for the Broker?
Thanks in advance
Joe |
|
Back to top |
|
 |
rajmq |
Posted: Mon Nov 29, 2004 7:35 am Post subject: |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Joe,
Using the message flow, we can handle publish and subscribe functions.
Use the below pub/sub details for confiure:
Register the topic using the below esql :
SET OutputRoot.MQRFH2.psc.Command='RegSub';
SET OutputRoot.MQRFH2.psc.Topic= InputRoot.XML."Message".Topic; (Read the topic from input msg)
SET OutputRoot.MQRFH2.psc.QmgrName='XXXXX';
SET OutputRoot.MQRFH2.psc.QName='XXXXX';
Put the message without rfh2 header and add the esql to publication msgflow..
SET OutputRoot.MQRFH2.psc.Command='Publish';
SET OutputRoot.MQRFH2.psc.Topic= InputRoot.XML."Message".Topic; (Read the topic from input msg)
SET OutputRoot.MQRFH2.psc.QmgrName='XXXXX';
SET OutputRoot.MQRFH2.psc.ReplyQ='XXXXX';
I hope this will help you !!!
Cheers,
RJ |
|
Back to top |
|
 |
jrjoe |
Posted: Mon Nov 29, 2004 8:21 am Post subject: |
|
|
Acolyte
Joined: 20 Jan 2003 Posts: 60
|
Thanks for the quick reponse on this.
I am running WBI EventBroker 5 and I am not sure if or how to configure or add the ESQL in.
Can you let me know how I would add this into Event Broker flow?
Thanks
Joe |
|
Back to top |
|
 |
rajmq |
Posted: Mon Nov 29, 2004 8:35 am Post subject: |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Hi
The above esql code to be in the Message broker.
Any particular reason for using Event broker.??
Cheers,
RJ |
|
Back to top |
|
 |
jrjoe |
Posted: Mon Nov 29, 2004 8:57 am Post subject: |
|
|
Acolyte
Joined: 20 Jan 2003 Posts: 60
|
At this point it was a cost issue for us.
Any way of doing this in Event Broker ? |
|
Back to top |
|
 |
|