ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Pub Sub Issue

Post new topic  Reply to topic
 Pub Sub Issue « View previous topic :: View next topic » 
Author Message
DJN
PostPosted: Sun Jul 28, 2013 4:54 am    Post subject: Pub Sub Issue Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Sun Jul 28, 2013 5:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Don't use Subscription Point.

It's not what you think it is.
Back to top
View user's profile Send private message
DJN
PostPosted: Sun Jul 28, 2013 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Sun Jul 28, 2013 10:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
vishnurajnr
PostPosted: Sun Jul 28, 2013 11:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DJN
PostPosted: Mon Jul 29, 2013 5:28 am    Post subject: Reply with quote

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
View user's profile Send private message
vishnurajnr
PostPosted: Mon Jul 29, 2013 5:33 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DJN
PostPosted: Mon Jul 29, 2013 6:08 am    Post subject: Reply with quote

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
View user's profile Send private message
vishnurajnr
PostPosted: Mon Jul 29, 2013 6:15 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Mon Jul 29, 2013 6:16 am    Post subject: Reply with quote

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
View user's profile Send private message
DJN
PostPosted: Wed Jul 31, 2013 2:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Jul 31, 2013 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
DJN
PostPosted: Thu Aug 01, 2013 12:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 02, 2013 5:13 am    Post subject: Reply with quote

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
View user's profile Send private message
james.mullineux
PostPosted: Thu Aug 08, 2013 4:21 am    Post subject: DJN subscription points Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Pub Sub Issue
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.