Author |
Message
|
pkanukuntla |
Posted: Thu Dec 17, 2015 12:45 pm Post subject: PUB SUB in Message Broker |
|
|
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 |
|
 |
mqjeff |
Posted: Thu Dec 17, 2015 12:50 pm Post subject: Re: PUB SUB in Message Broker |
|
|
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 |
|
 |
Vitor |
Posted: Thu Dec 17, 2015 12:53 pm Post subject: Re: PUB SUB in Message Broker |
|
|
 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 |
|
 |
Vitor |
Posted: Thu Dec 17, 2015 12:54 pm Post subject: Re: PUB SUB in Message Broker |
|
|
 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 |
|
 |
pkanukuntla |
Posted: Thu Dec 17, 2015 1:11 pm Post subject: PUB SUB in Message Broker |
|
|
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 |
|
 |
mqjeff |
Posted: Thu Dec 17, 2015 1:24 pm Post subject: Re: PUB SUB in Message Broker |
|
|
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 |
|
 |
pkanukuntla |
Posted: Thu Dec 17, 2015 1:35 pm Post subject: PUB SUB in Message Broker |
|
|
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 |
|
 |
mqjeff |
Posted: Thu Dec 17, 2015 1:45 pm Post subject: |
|
|
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 |
|
 |
smdavies99 |
Posted: Thu Dec 17, 2015 10:54 pm Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Dec 18, 2015 5:32 am Post subject: Re: PUB SUB in Message Broker |
|
|
 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 |
|
 |
bruce2359 |
Posted: Fri Dec 18, 2015 5:59 am Post subject: Re: PUB SUB in Message Broker |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
fjb_saper |
Posted: Fri Dec 18, 2015 6:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
pkanukuntla |
Posted: Wed Mar 09, 2016 9:05 am Post subject: |
|
|
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 |
|
 |
|