Author |
Message
|
DJN |
Posted: Sun Jul 28, 2013 4:54 am Post subject: Pub Sub Issue |
|
|
Apprentice
Joined: 14 Apr 2003 Posts: 47
|
Hi, I am currently attempting my first Pub/Sub test application. As expected it is not working as I anticipated. I am including the code and properties that I set. I would appreciate any input that will help me better understand this process.
Compute Node esql code:
CALL CopyEntireMessage();
DECLARE TopicValue CHARACTER 'DON.TOPIC';
DECLARE TestValue CHARACTER;
SET OutputRoot.MQRFH2.psc.TOPIC = TopicValue;
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'SYSTEM.BROKER.DEFAULT.STREAM';
(Not sure that I need the previous command)
The message is then passed to a Publication node where the SubscriptionPoint is set to DON.SUBPT.
The subscription is set with the following values.
There is a queue named DON.OUT which is the target of the subscription.
Topic Info:
Topic Name: Dons.Topic
Topic Type: local
Topic String:DON.TOPIC
The rest of the attributes are set at the default values.
Obviously there is a missing or mismatch on the properties. Any input on this topic will be appreciated. |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jul 28, 2013 5:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Don't use Subscription Point.
It's not what you think it is. |
|
Back to top |
|
 |
DJN |
Posted: Sun Jul 28, 2013 5:43 pm Post subject: |
|
|
Apprentice
Joined: 14 Apr 2003 Posts: 47
|
OK , I will ask later what the subscription point really is.
Now in my publication node I have neither the check box selected nor a value entered in the subscription point text box.
I still do not see what ties this publication with the Subscription. I think that is has to be the topic.
In the latest attempt the flow appears to have completed but I do not see anything on the expected queue. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jul 28, 2013 10:13 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Provided you have a properly defined Topic then all you need to do is this
Code: |
set OutputRoot.Properties.Topic = 'TEST/MYTOPIC/Output';
|
Where 'TEST/MYTOPIC/Output' is the name of the topic I'm publishing to.
Don't forget that MQExplorer can test your pub/sub operation outside the broker flow. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
vishnurajnr |
Posted: Sun Jul 28, 2013 11:54 pm Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
If using WMB V7 or higher, connect the OUT terminal of the publication node to see if the subscriber matches with your topic. _________________ -------
A man is great by deeds, not by birth...! |
|
Back to top |
|
 |
DJN |
Posted: Mon Jul 29, 2013 5:28 am Post subject: |
|
|
Apprentice
Joined: 14 Apr 2003 Posts: 47
|
I am assuming that you want me to connect the output of the Publication node to am MQ Output? |
|
Back to top |
|
 |
vishnurajnr |
Posted: Mon Jul 29, 2013 5:33 am Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
You can wire the "NoMatch" And "OUT" terminal of Publication Node to any output node to see if any subscriber really existing for that publication.
Code: |
NoMatch : If no subscribers are matched on any of the published topics, the original message is propagated here.
Out : If at least one subscriber is matched by WebSphere MQ on at least one of the published topics, the original message is propagated here. |
_________________ -------
A man is great by deeds, not by birth...! |
|
Back to top |
|
 |
DJN |
Posted: Mon Jul 29, 2013 6:08 am Post subject: |
|
|
Apprentice
Joined: 14 Apr 2003 Posts: 47
|
vishnurajnr:
I connected an MQ Output node to the out terminal of the Publisher node. The message never arrived on the queue. |
|
Back to top |
|
 |
vishnurajnr |
Posted: Mon Jul 29, 2013 6:15 am Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
That shows the topic you are publishing is not subscribed yet.
Open your MQ Explorer and check the subscriptions. if no subscriptions created, create a subscription for the topic you are publishing. _________________ -------
A man is great by deeds, not by birth...! |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 29, 2013 6:16 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
DJN wrote: |
vishnurajnr:
I connected an MQ Output node to the out terminal of the Publisher node. The message never arrived on the queue. |
The MQ Topic object isn't strictly necessary.
You need an MQ Subscription object. You need to ensure that the resolved topic of the TOPICOBJ of the subscription plus the TOPICSTR field resolves to the full TOPIC being published to.
So if you have a SUB object with TOPICOBJ of "MyTopicObject", and MyTopicObject has a topic of "DONS.TOPIC", and the TOPICSTR of the SUB is "DONS.TOPIC", then you would need to be publishing to "DONS.TOPICDONS.TOPIC".
So I wouldn't bother with TOPICOBJ.
Topic objects are points of administrative control, not points of application connectivity.
To make it work to have an Publish node put a message on a queue, the minimum is to set the OutputRoot.Properties.Topic to a fully qualified topic string, and then create an MQ Subscription object that uses that fully qualified topic string and has a DESTINATION of the queue. |
|
Back to top |
|
 |
DJN |
Posted: Wed Jul 31, 2013 2:08 pm Post subject: |
|
|
Apprentice
Joined: 14 Apr 2003 Posts: 47
|
Just to make sure I understand:
I do not need to create a Topic on the MQ manager.
(I do still have a Topic on the qm that has the values that I am testing with.)
I need to set the topic in the Output Properties to the string that represents the value of the concatenation of the topic name and the topic from the subscription.
I am testing with this configuration and the message is always taking the NoMatch path. Do you have any ideas as to why this would be happening? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 31, 2013 2:25 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
DJN wrote: |
I need to set the topic in the Output Properties to the string that represents the value of the concatenation of the topic name and the topic from the subscription. |
No.
You need to set the topic to the fully qualified topic string that represents the real topic.
The publication node doesn't know anything at all about Topic objects in MQ. It knows only about OutputRoot.Properties.Topic (or the MQRFH2 equivalent field).
So if you register a subscription to the topic "DONS.TOPIC", then the OutputRoot.Properties.Topic should be "DONS.TOPIC". |
|
Back to top |
|
 |
DJN |
Posted: Thu Aug 01, 2013 12:12 pm Post subject: |
|
|
Apprentice
Joined: 14 Apr 2003 Posts: 47
|
Jeff, thanks for all you assistance. I have my pubsub flow working.
Early in this post you said that the subscription points where not what I thought they were. Can you please tell me what they are and how they are used? |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 02, 2013 5:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
DJN wrote: |
Jeff, thanks for all you assistance. I have my pubsub flow working.
Early in this post you said that the subscription points where not what I thought they were. Can you please tell me what they are and how they are used? |
They're obsolete, and shouldn't be used. |
|
Back to top |
|
 |
james.mullineux |
Posted: Thu Aug 08, 2013 4:21 am Post subject: DJN subscription points |
|
|
Newbie
Joined: 08 Aug 2013 Posts: 1
|
Subscription points were the old way to narrow down the scope of the messages you are subscribed to. Normally you would specify a topic and you would receive all publications to that topic or the subtopics under that topic. You can use filters to narrow this down even more.
Subscription points allowed you to specify a set of publication nodes in flows that are the only messages you want to receive. For example if you have two flows with publication nodes and set the subscription points to subscription_point_1 and subscription_point_2 then you can set a subscriber's subscription point property to subscription_point_1 and you will only receive the messages published from the first publisher and not the second.
They were used mainly in Broker pre v7 before Message Broker supported MQ pub/sub and are still in the product for backwards compatibility and migration scenarios. The way to achieve the same thing with the latest versions of WebSphere Message Broker and IBM Integration Bus is to construct your topic hierarchy such that it is already partitioned for what you need and then to use filters if you need even greater control. |
|
Back to top |
|
 |
|