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 » General Discussion » Working on Pub/Sub first Time

Post new topic  Reply to topic
 Working on Pub/Sub first Time « View previous topic :: View next topic » 
Author Message
Mangesh1187
PostPosted: Mon May 26, 2014 3:33 am    Post subject: Working on Pub/Sub first Time Reply with quote

Centurion

Joined: 23 Mar 2013
Posts: 116

Hi All,

I have installed the WMQ 7.0.1 on my local Windows7 PC for PUB/SUB learning.

I have created a TOPIC object TESTTOPIC with topic string 'TEST/TOPC1/TOPIC2'
And Subscriber Object as TESTSUB with Destination as local queue 'PUBSUB.LOCAL.QUEUE'

After this I right clicked on TESTTOPIC obejct and then on 'TestPublication'. Then simultaneously on Test Subscription.

After that I typed a message in Pubiishing Windows & hope that I got Message in the local queue 'PUBSUB.LOCAL.QUEUE'

But instead, as a result , I could see message in Subscriber console & not in queue.

After that I clicked on Sbscription icon (on Left Panael Under QueueManager directory) and found there is another one subscriebr was runnning (MANAGED) with the same topic string.

[ I hope when I clicked on Test Subscriber , that another Subscrber program (MANAGED/API) has started. ]

And suprisingly can see topic string of 'TESTTOPIC' become
'TEST/TOPC1/TOPIC2/TEST/TOPC1/TOPIC2'

My concern is ,
1. Why this TOPICSTRING change happend.
2. If I want to test for my newly created Subscriber, TESTSUB so that messages can go to the queue 'PUBSUB.LOCAL.QUEUE', How can I test using MQ Explorer

Please guide for the same
Back to top
View user's profile Send private message
Mangesh1187
PostPosted: Mon May 26, 2014 9:41 am    Post subject: Reply with quote

Centurion

Joined: 23 Mar 2013
Posts: 116

Hi

Just to correct the vdetails. My MQ version is 7.1.0

Also please help me work out this senario. Iam now keenly interested.
Back to top
View user's profile Send private message
hughson
PostPosted: Mon May 26, 2014 11:34 pm    Post subject: Re: Working on Pub/Sub first Time Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

Mangesh1187 wrote:
I have created a TOPIC object TESTTOPIC with topic string 'TEST/TOPC1/TOPIC2'
And Subscriber Object as TESTSUB with Destination as local queue 'PUBSUB.LOCAL.QUEUE'

After this I right clicked on TESTTOPIC obejct and then on 'TestPublication'. Then simultaneously on Test Subscription.
So at this point you have two subscribers, one you created called TESTSUB and one from the Test Subscription window.

Mangesh1187 wrote:
After that I typed a message in Pubiishing Windows & hope that I got Message in the local queue 'PUBSUB.LOCAL.QUEUE'

But instead, as a result , I could see message in Subscriber console & not in queue.
I suspect your TESTSUB definition is incorrect, please provide details of it.

Mangesh1187 wrote:
After that I clicked on Sbscription icon (on Left Panael Under QueueManager directory) and found there is another one subscriebr was runnning (MANAGED) with the same topic string.

[ I hope when I clicked on Test Subscriber , that another Subscrber program (MANAGED/API) has started. ]
This other subscriber is the one from you Test Subscriber window.

Mangesh1187 wrote:
And suprisingly can see topic string of 'TESTTOPIC' become
'TEST/TOPC1/TOPIC2/TEST/TOPC1/TOPIC2'
Do you mean this is the topic string of your topic object, or this is the topic string of your TESTSUB subscriber? A screenshot or an MQSC display output would clarify.

Mangesh1187 wrote:
My concern is ,
1. Why this TOPICSTRING change happend.
2. If I want to test for my newly created Subscriber, TESTSUB so that messages can go to the queue 'PUBSUB.LOCAL.QUEUE', How can I test using MQ Explorer

Please guide for the same
You can test whether messages go to you TESTSUB subscriber queue from MQ Explorer exactly as you did, I.e. using the Test Publisher window. No need to also have a Test Subscriber window as you have made your subscriber by defining it already. You already tested it and found it was not using the same topic string. I suspect that you have made your TESTSUB subscription by putting in the topic object to be used as well as the topic string, thus "doubling up" the final resolved topic string. Suggest, since you have created a TOPIC object to use, that you just use this and do not also add a topic string to you TESTSUB.

I am guessing here, so if you could provide the details of the definitions that you made, we can see whether this is actually the case.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Mangesh1187
PostPosted: Tue May 27, 2014 1:03 am    Post subject: Reply with quote

Centurion

Joined: 23 Mar 2013
Posts: 116

Hi Hugson,

Yes. I will test the senario suggested by you. Also will provide the object defination soon.

Meanwhile I have quick concern:
If I define the SUBSCRIBER object in queue manager for a perticular topic & destination queue, does it mean the scbscription is in place.

In other words if publication done for above topic , the message will be reach to the destination queue in SUBSCRIBER object, even if the application using that queue is not connected ?
Back to top
View user's profile Send private message
hughson
PostPosted: Tue May 27, 2014 2:12 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

Mangesh1187 wrote:
If I define the SUBSCRIBER object in queue manager for a perticular topic & destination queue, does it mean the scbscription is in place.

In other words if publication done for above topic , the message will be reach to the destination queue in SUBSCRIBER object, even if the application using that queue is not connected ?
Yes, absolutely. The subscription you have created is a DURABLE subscription, and will happily collect up messages on the nominated queue even while the application that intends to consume them is not connected.

If you wish to have a non-durable subscription, i.e. one that is removed as soon as the application using it disconnects from the queue manager, you must make it using the MQSUB verb from within the application.

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Mangesh1187
PostPosted: Tue May 27, 2014 8:55 am    Post subject: Reply with quote

Centurion

Joined: 23 Mar 2013
Posts: 116

Topic Object created using MQ Explorer:
Code:
display topic(TESTTOPIC)
    23 : display topic(TESTTOPIC)
AMQ8633: Display topic details.
   TOPIC(TESTTOPIC)                        TYPE(LOCAL)
   TOPICSTR(TEST/TOPIC1/TOPIC2)            DESCR(Testing topic object creation)
   CLUSTER( )                              DURSUB(ASPARENT)
   PUB(ASPARENT)                           SUB(ASPARENT)
   DEFPSIST(ASPARENT)                      DEFPRTY(ASPARENT)
   DEFPRESP(ASPARENT)                      ALTDATE(2014-05-22)
   ALTTIME(23.08.06)                       PMSGDLV(ASPARENT)
   NPMSGDLV(ASPARENT)                      PUBSCOPE(ASPARENT)
   SUBSCOPE(ASPARENT)                      PROXYSUB(FIRSTUSE)
   WILDCARD(PASSTHRU)                      MDURMDL( )
   MNDURMDL( )                             MCAST(ASPARENT)
   COMMINFO( )                             USEDLQ(ASPARENT)
   CUSTOM( )


SUB object created using MQ Explorer.
WIth both TOPIC Name(TESTTOPIC) & TOPICString(TEST/TOPIC1/TOPIC2) values:

Code:
display sub(TESTSUB)
    25 : display sub(TESTSUB)
AMQ8096: WebSphere MQ subscription inquired.
   SUBID(414D5120514D54455354312020202020BA458C4A2000B440)
   SUB(TESTSUB)
   TOPICSTR(TEST/TOPIC1/TOPIC2/TEST/TOPIC1/TOPIC2)
   TOPICOBJ(TESTTOPIC)                     DEST(LQ)
   DESTQMGR( )                             PUBAPPID( )
   SELECTOR( )                             SELTYPE(NONE)
   USERDATA( )
   PUBACCT(160105150000005E6FE07B473743DB43FF0D42EE03000000000000000000000B)
   DESTCORL(414D5120514D54455354312020202020BA458C4A2000B440)
   DESTCLAS(PROVIDED)                      DURABLE(YES)
   EXPIRY(UNLIMITED)                       PSPROP(MSGPROP)
   PUBPRTY(ASPUB)                          REQONLY(NO)
   SUBSCOPE(ALL)                           SUBLEVEL(1)
   SUBTYPE(ADMIN)                          VARUSER(ANY)
   WSCHEMA(TOPIC)                          SUBUSER(MUSR_MQADMIN)
   CRDATE(2009-08-20)                      CRTIME(01:10:35)
   ALTDATE(2009-08-20)                     ALTTIME(01:10:35)


Then I created the belw Sub
WIth TOPICString(TEST/TOPIC1/TOPIC2) usig MQ Explorer


Code:
display sub(TESTSUB)
    24 : display sub(TESTSUB)
AMQ8096: WebSphere MQ subscription inquired.
   SUBID(414D5120514D54455354312020202020BA458C4A20002455)
   SUB(TESTSUB)                            TOPICSTR(TEST/TOPIC1/TOPIC2)
   TOPICOBJ(TESTTOPIC)                     DEST(PUBSUB.LOLAL.QUEUE)
   DESTQMGR( )                             PUBAPPID( )
   SELECTOR( )                             SELTYPE(NONE)
   USERDATA( )
   PUBACCT(160105150000005E6FE07B473743DB43FF0D42EE03000000000000000000000B)
   DESTCORL(414D5120514D54455354312020202020BA458C4A20002455)
   DESTCLAS(PROVIDED)                      DURABLE(YES)
   EXPIRY(UNLIMITED)                       PSPROP(MSGPROP)
   PUBPRTY(ASPUB)                          REQONLY(NO)
   SUBSCOPE(ALL)                           SUBLEVEL(1)
   SUBTYPE(ADMIN)                          VARUSER(ANY)
   WSCHEMA(TOPIC)                          SUBUSER(MUSR_MQADMIN)
   CRDATE(2009-08-20)                      CRTIME(00:11:13)
   ALTDATE(2009-08-20)                     ALTTIME(00:11:13)


After that I had TestPublication on TOPIC object. This time I can see message has been reached to the destination queue as expected.
Back to top
View user's profile Send private message
hughson
PostPosted: Wed May 28, 2014 1:06 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

Mangesh1187 wrote:
SUB object created using MQ Explorer.
WIth both TOPIC Name(TESTTOPIC) & TOPICString(TEST/TOPIC1/TOPIC2) values

Yes, I had a funny feeling this is what you had done. By putting in both the topic object and the topic string you are telling the queue manager that you want the full topic string your subscription is using to be as follows:-

1) Look up the topic object provided, and pull out the topic string from there:-
Mangesh1187 wrote:
Code:
AMQ8633: Display topic details.
   TOPIC(TESTTOPIC)                        TYPE(LOCAL)
   TOPICSTR(TEST/TOPIC1/TOPIC2)            DESCR(Testing topic object creation)

2) Append the topic string provided as part of the subscription to the end of that found from the topic object, which a '/' character separating the two parts.

Thus you subscribed on 'TEST/TOPIC1/TOPIC2' + '/' + 'TEST/TOPIC1/TOPIC2'

which resulted in the subscription you see:-
Mangesh1187 wrote:
Code:
display sub(TESTSUB)
    25 : display sub(TESTSUB)
AMQ8096: WebSphere MQ subscription inquired.
   SUBID(414D5120514D54455354312020202020BA458C4A2000B440)
   SUB(TESTSUB)
   TOPICSTR(TEST/TOPIC1/TOPIC2/TEST/TOPIC1/TOPIC2)
   TOPICOBJ(TESTTOPIC)                     DEST(LQ)
   DESTQMGR( )                             PUBAPPID( )
   SELECTOR( )                             SELTYPE(NONE)
   USERDATA( )
   PUBACCT(160105150000005E6FE07B473743DB43FF0D42EE03000000000000000000000B)
   DESTCORL(414D5120514D54455354312020202020BA458C4A2000B440)
   DESTCLAS(PROVIDED)                      DURABLE(YES)
   EXPIRY(UNLIMITED)                       PSPROP(MSGPROP)
   PUBPRTY(ASPUB)                          REQONLY(NO)
   SUBSCOPE(ALL)                           SUBLEVEL(1)
   SUBTYPE(ADMIN)                          VARUSER(ANY)
   WSCHEMA(TOPIC)                          SUBUSER(MUSR_MQADMIN)
   CRDATE(2009-08-20)                      CRTIME(01:10:35)
   ALTDATE(2009-08-20)                     ALTTIME(01:10:35)


From the publishing information you provided earlier, I assume you only want to provide the topic object when you defined your subscription with MQ Explorer and not both the topic object AND the topic string.

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Mangesh1187
PostPosted: Fri Jun 06, 2014 1:41 am    Post subject: Reply with quote

Centurion

Joined: 23 Mar 2013
Posts: 116

Hi Morag,

Your input helped me.
Now I am working from devlopment side of Pub/Sub.

In my organization we are using the WAS (8.5) & JMS .
There(WAS Admin console) I have created the Topic Connection Factory. In the Broker properties , under the capabilities , there are 2 radio buttons to select.

1. Version 1 Broker
2. version 2 Broker

Can anybody spread lights on what exactly is the differance between version 1 & version 2. What are the significance of these ?

Note: I have to conenct to MQ Version 7 queue manager.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Jun 06, 2014 2:03 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9396
Location: US: west coast, almost. Otherwise, enroute.

You want one of us to do this research for you? Have you tried searching google for this? Have you looked at the announcement letters for the newer version? I imagine that it would itemize what's new in the newer version.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Mangesh1187
PostPosted: Fri Jun 06, 2014 3:00 am    Post subject: Reply with quote

Centurion

Joined: 23 Mar 2013
Posts: 116

Hi Bruce,

I dont want from you experts to reasearch for me.

Actually I am trying to google , but its not very much clear to me, below is the link.

http://www-01.ibm.com/support/knowledgecenter/?lang=en#!/SSFKSJ_7.0.1/com.ibm.mq.amqnar.doc/ps29080_.htm?cp=SSFKSJ_7.0.1%2F1-16-6-4

And also have some basic doubts .

e.g.
1. The version 1 broker means the one which comes with WMQ 6 & Version 2 means one with WMQ 7 ?

2. Pub/Sub using MQ 6 is called the queued publication as it uses the queues for the publication/subscription . And WMQ7 isnt . But not having clar picture of how in WMQ7 pubsub works if no queus used.



It will be greatfull if you guys just give your thoughts or provide any link so that I can get more clear picture.
Back to top
View user's profile Send private message
hughson
PostPosted: Fri Jun 06, 2014 3:06 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

Mangesh1187 wrote:
Pub/Sub using MQ 6 is called the queued publication as it uses the queues for the publication/subscription . And WMQ7 isnt . But not having clar picture of how in WMQ7 pubsub works if no queus used.

MQ V7 Pub/Sub doesn't avoid queues altogether - there are still queues for each subscriber.

The distinction between "Queued Pub/Sub" which is the V6 methodology and V7 Pub/Sub, is that when using "Queued Pub/Sub" you indicate your interest in a topic, i.e. make a subscription, by placing a specifically formatted message on a specific queue, the SYSTEM.BROKER.* queues. In V7 you achieve the same by using the MQSUB verb on a topic (or the DEFINE SUB command).

This is why V6 style Pub/Sub is called "Queued Pub/Sub".

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Mangesh1187
PostPosted: Fri Jun 06, 2014 3:26 am    Post subject: Reply with quote

Centurion

Joined: 23 Mar 2013
Posts: 116

Thanks Morag. Its clear now.

My senario is :

Applicaion A > QM > ApplicationB
Publish Subscribe

Application A :
Publisher
Existing application using QueuedPublications (SYSTEM.BROKER.*) queues.

MQ : V 7.1.0

Application B :
Subscriber
New application in development where we are using JMS+WAS(8.5).
Can we use new MQ7 features & JMS API for pubsub , without using broker queues ?

Also still there is doubt for me about Version1 & Version 2 brokers.
Is it like broker with MQ6 is Version 1 & with MQ7 is version2?
In WAS configuration I have to select any one of it.

There is also one filed in WAS configuration i.e. provider version. I hope it is the MQ version used for the PubSub. (& different from Broker version)
Back to top
View user's profile Send private message
calanais
PostPosted: Fri Jun 06, 2014 6:53 am    Post subject: Reply with quote

Apprentice

Joined: 12 Mar 2010
Posts: 32

For the new application being written within WAS 8.5.5 (that will use the WMQ Resource Adapter) you won't need to worry about the broker version settings;

Setting the provider version to 7 will force the WMQ Resource Adapter (which is 'powered by' the WMQ JMS classes) to use the new style WMQ v7 pubsub engine. This uses the 'Normal' mode of operation - in this case the broker version property is unused here.

When working with 'queued pub/sub' the broker version property controls the format of the publish/subscribe 'control' messages sent.

BrokerVersion here is the property documented in http://www-01.ibm.com/support/knowledgecenter/api/content/SSFKSJ_7.5.0/com.ibm.mq.ref.dev.doc/q111910_.htm
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 » General Discussion » Working on Pub/Sub first Time
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.