Author |
Message
|
Arjun |
Posted: Thu Jul 22, 2004 10:36 am Post subject: Pub-sub help. |
|
|
Newbie
Joined: 29 Jun 2004 Posts: 3
|
Pardon my novice question. I searched all the mqseries.net and did not help me enough.
I am trying to implement a Pub-Sub solution. Theoratically I know the concepts but I am not able to implement it.
Let me tell you what I am doing. Please guide me.
[b]Publication FLOW:
---------------
I have 3 nodes:
Input Node - > compute node - > Publication Node.
Input Node : It refers a queue called Pub_Q.
Compute node: It has the following code.
set OutputRoot.MQMD.Format = 'MQHRF2 ';
Set OutputRoot.MQRFH2.psc.Command='Publish';
Set OutputRoot.MQRFH2.psc.Topic='TEST_TOPIC';
Publication: I did not do anything with it.
Subscriber flow:
---------------
I have 3 nodes.
Input Node - > compute node - > output node
Input Node : It refers a queue called SUB_Q1.
Compute
---------
set OutputRoot.MQMD.Format = 'MQHRF2 ';
Set OutputRoot.MQRFH2.psc.Command='RegSub';
Set OutputRoot.MQRFH2.psc.Topic='TEST_TOPIC';
Set OuptutRoot.MQRFH2.psc.QName='SUB_Q2';
Set OutputRoot.MQRFH2.psc.QMgrName='QM1';
Output node: It refers to SYSTEM.BROKER.CONTROL.QUEUE.
AM I missing anything. How should I proceed. I am of the understanding that if we put a message in Pub_Q it will be sent to all the subscribers. How do I test it. I am lost. |
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 22, 2004 10:44 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Please post WMQI related question into WMQI Forum
[Moved to WMQI Forum] _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 22, 2004 10:54 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
May I know what are you trying to do using these two flows?
What is your broker queue manager name? is it QM1?
You might want to start with SupportPac IH06: WebSphere MQ Integrator - Publish/Subscribe client utility. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Arjun |
Posted: Thu Jul 22, 2004 10:59 am Post subject: |
|
|
Newbie
Joined: 29 Jun 2004 Posts: 3
|
OK. My QM is QM1.
My broker is BRKR_QM1.
I have 2 flows.
Publication FLOW and Subscriber flow.
ANy and all help is REALLY appreciated. |
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 22, 2004 1:15 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Your Publish message flow looks correct.
There are many supportPacs out there which provide utility for registring a subscriber to the Broker. You can use those instead of doing it using a message flow. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
kspranava |
Posted: Sun Jul 25, 2004 6:34 pm Post subject: |
|
|
 Centurion
Joined: 27 Apr 2003 Posts: 124
|
Arjun,
In compute node of subscriber flow, use the below given SQL. Format is MQRFH2 and not MQHRF2.
(remove)
set OutputRoot.MQMD.Format = 'MQHRF2 ';
(add)
SET OutputRoot.MQMD.Format=MQFMT_RF_HEADER_2; |
|
Back to top |
|
 |
kirani |
Posted: Sun Jul 25, 2004 10:24 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Constant value for MQRFH2 header in Format field is MQHRF2, but I agree with you that he should use MQ constant instead of hardcoding values. I believe he is missing leading spaces in this field in his code.
Code: |
MQFMT_RF_HEADER_2 'MQHRF2 '
|
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 26, 2004 5:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Here's the rest of his question.
In order to use these two flows, this is what you should do.
Deploy them both.
Put a message to the Subscriber flow.
Look for errors in the system log.
In the Control Center or Domain view, confirm that the subscription has been registered.
Put a message to the publication flow.
Look for errors in the system log.
Confirm that the message was published to SUB_Q2. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|