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 » PUB SUB in Message Broker

Post new topic  Reply to topic
 PUB SUB in Message Broker « View previous topic :: View next topic » 
Author Message
pkanukuntla
PostPosted: Thu Dec 17, 2015 12:45 pm    Post subject: PUB SUB in Message Broker Reply with quote

Novice

Joined: 16 Dec 2015
Posts: 12

Hi,

I have read so many articles about pub sub environment.

Below is my requirement.


Data will be published from external database to MQ TOPICS..Now message broker flow has to consume or subscribe to that topic and message should be stored in a queue.

Im aware that till MB6 PUB SUB can be done in Broker later, it was not available. But going with manual subsciription in queue is very complicated process for our requirement.
So, can anyone plz respond to this query. I tried many blogs and articles but i didnt find any relevant answers.

Thanks.
Praneeth.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 17, 2015 12:50 pm    Post subject: Re: PUB SUB in Message Broker Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

pkanukuntla wrote:
But going with manual subsciription in queue is very complicated process for our requirement.


Can you explain this more?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 17, 2015 12:53 pm    Post subject: Re: PUB SUB in Message Broker Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pkanukuntla wrote:
Im aware that till MB6 PUB SUB can be done in Broker later, it was not available.


Not true. WMBv7 (and later versions) simply exploited the pub/sub capabilities of their associated queue manager rather than running their own. It was still available.

pkanukuntla wrote:
Data will be published from external database to MQ TOPICS..Now message broker flow has to consume or subscribe to that topic and message should be stored in a queue.


Not an issue.

pkanukuntla wrote:
So, can anyone plz respond to this query.


Respond with what?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 17, 2015 12:54 pm    Post subject: Re: PUB SUB in Message Broker Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
pkanukuntla wrote:
But going with manual subsciription in queue is very complicated process for our requirement.


Can you explain this more?




Also explain how it's more complicated for IIB than any other subscribing application.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pkanukuntla
PostPosted: Thu Dec 17, 2015 1:11 pm    Post subject: PUB SUB in Message Broker Reply with quote

Novice

Joined: 16 Dec 2015
Posts: 12

We are using MBv8 and MQV8. Messages has to get dynamically subscribed in MQ.

I want to try in out of box context. So if anyone can suggest any idea by subscribing in a flow rather than MQ i can try and give some more options to that.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 17, 2015 1:24 pm    Post subject: Re: PUB SUB in Message Broker Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

pkanukuntla wrote:
Messages has to get dynamically subscribed in MQ.


Can you explain this more?

You can create an administrative subscription that points to a queue, where the topic of the subscription is wildcarded.

Does this meet the requirement?

Are you trying to use some message data to create a subscription to some other topic? If so, you have to use some sort of Read/Get node, instead of some kind of Input node.

There is more than one kind of transport that can receive messages from MQ.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
pkanukuntla
PostPosted: Thu Dec 17, 2015 1:35 pm    Post subject: PUB SUB in Message Broker Reply with quote

Novice

Joined: 16 Dec 2015
Posts: 12

let me give some assumptions on my requirement.

I created topics in message queue.

In WMBV8 i designed flow as below.

MQinput node --> Compute Node--> MQoutput(SYstem.Broker.control.queue)

I have written the code in compute node for subscribing to the topic and storing it in a queue.
Code:
SET OutputRoot.MQMD.Format  = 'MQRFH2';      
SET OutputRoot.MQRFH2.psc.Command =  InputRoot.XMLNSC.SubMsg.Command;
SET OutputRoot.MQRFH2.psc.Topic= InputRoot.XMLNSC.SubMsg.Topic;
SET OutputRoot.MQRFH2.psc.QMgrName= InputRoot.XMLNSC.SubMsg.QMgrName;
SET OutputRoot.MQRFH2.psc.QName= InputRoot.XMLNSC.SubMsg.QName;


for trying output. i have prepared one xml file where it contains below data.
Code:
<SubMsg>
  <Topic>TT_XML_EXAMPLE_TOPIC</Topic>
  <QMgrName>TEST12</QMgrName>
  <QName>QEVENT</QName>
</SubMsg>



When im sending xml file to mqinput, after checking code in compute node later it has to store subscribed message in a queue which will be there in mq explorer as local queue. But thats not happening.
In debug mode, when message is sent it goes to input then later it goes to output queue but im not able to see any message in MQ local queue.

Does this give any info on my requirement ?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 17, 2015 1:45 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Again, why are you trying to do this?

What reason is there for not using a regular administrative subscription?

Also, again, if you're trying to read a message from the middle of a flow, you need to use a Get/Read node.

This would allow you to configure something to get the message from the subscription you want, which you could then use an MQOutput node to write.

But it's really not clear what you're actually trying to do, or why you want to do it in Broker.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Dec 17, 2015 10:54 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.

mqjeff wrote:
Again, why are you trying to do this?

What reason is there for not using a regular administrative subscription?

Also, again, if you're trying to read a message from the middle of a flow, you need to use a Get/Read node.

This would allow you to configure something to get the message from the subscription you want, which you could then use an MQOutput node to write.

But it's really not clear what you're actually trying to do, or why you want to do it in Broker.


Probably some wierd requirement from an Architect who does not use or know the product
as identified in my post 'And the Requirement is'.

It is clear that the OP does not know the product either. That is not unusual these days (well, I that is the impression I get from reading many of the posts here)


To the OP

Please explain why the normal use of MQ Pub/Sub is inadequate for your solution. Please go into detail so that we can try to get inside your mind and properly understand what you are trying to do.
_________________
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
Vitor
PostPosted: Fri Dec 18, 2015 5:32 am    Post subject: Re: PUB SUB in Message Broker Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pkanukuntla wrote:
In debug mode, when message is sent it goes to input then later it goes to output queue but im not able to see any message in MQ local queue.


Why would there be a message in any queue as a result of doing that?

pkanukuntla wrote:
Does this give any info on my requirement ?


Not even slightly. The code you've posted is a massively heavyweight way of doing something you could have done with a simple command. It also gives insight into what you're doing without shedding any light on why you think you need to do it.

It's the classic situation where a "requirement" seems to have been phrased as a piece of pseudo-code rather than an actual requirement.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Dec 18, 2015 5:59 am    Post subject: Re: PUB SUB in Message Broker Reply with quote

Poobah

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

Vitor wrote:

It's the classic situation where a "requirement" seems to have been phrased as a piece of pseudo-code rather than an actual requirement.

Worded a bit differently: the OP has a solution in mind (including naming the tools to implement the solution) , but doesn't define the business problem the solution addresses.
_________________
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
fjb_saper
PostPosted: Fri Dec 18, 2015 6:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

I understand you are trying to do a dynamic subscription on behalf of an application that is not able to do so by itself...

So a number of things can go wrong. You may want to look into requesting a response for your subscription message (request / reply) and checking the corresponding return code in the RFH2 header. This will tell you if your subscription attempt was successful.

One other thing. You specify subscription qmgr and subscription queue, however is there a default route between the publication qmgr and the subscription qmgr ?? The lack of such would be grounds enough for the subscription failing...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
pkanukuntla
PostPosted: Wed Mar 09, 2016 9:05 am    Post subject: Reply with quote

Novice

Joined: 16 Dec 2015
Posts: 12

Sorry for late reply.

Exactly, this is the requirement said by an architect. But after doing some troubleshooting everything, finally came to conclusion to use mq as subscriber and get the same message to flow.

Thanks all for your suggestions.
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 » PUB SUB in Message Broker
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.