|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Where's the "Subscribe" node? |
« View previous topic :: View next topic » |
Author |
Message
|
barda900 |
Posted: Sun Dec 09, 2007 4:46 am Post subject: Where's the "Subscribe" node? |
|
|
Newbie
Joined: 08 Dec 2007 Posts: 5
|
Hello,
I'm probably missing something really obvious here, byt please bear with me,
as I'm not really familiar with Websphere Message Broker (I do know MQ though).
The thing is, I can't believe there's no "Subscribe" node which I can use
for dynamically subscribing to the topic. I've read "Developing publish/subscribe applications"
and "Publish/subscribe" sections of the library. I have also read messagebroker_Publish_Subscribe.pdf PDF
and have read all the www.mqseries.net messages related to publish/subcribing.
What I'd like to achieve is to have a flow with an input "Subscribe" node, in which
I would define my topic name and that would be all I'd have to do to publish messages
from a flow to another one, but from what I gather I must do it manually, because the docs say
"Subscribers issue subscription registration requests to their local broker when they want to receive published messages.
All the information associated with the subscription is recorded by the broker in the broker's subscription table."
And there's also a great deal of discussion here on the forum on how to properly set
the MQRFH2 headers for subcribing dynamically to messages, or how to use the rfhutil program,
or how to do it programatically (from Java, Visual Basic, etc.) But I'd really like
to avoid it and have the broker manage the subcription process.
The only way I can imagine right now is to use the JMSInput and JMSOutput nodes,
but that, on the other hand, would require me to administer the JNDI objects, which
I'm OK with but still it's a thing to do which could have been avoided (there will be ~600 topics)
had I have an access to a "Subscribe" node in the palette :-)
So, to sum it up, is what I describe doable at all? Because it sounds like a basic
requirement for a broker, right? Friends, how do you deal with it?
For development, I'm using Windows:
- broker toolkit - 6.0.2 ifix 010 Build id 20061201_1308
- broker 6.0.0 fixpack 6
- MQ 6.0.0.2
The target environment will run on z/OS.
Thanks for any help and suggestions! |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 09, 2007 9:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
well if you've read the documentation you should know by now that publication and subscription are governed by the RFH2 header.
The broker does have a publication node, so put any topic in the RFH2 header with the publication command, pass it to a publication node and it will be published.
The same applies for the subscriptions. You just send them to the relevant system queue (as set by rfhutil)...
You might want to upgrade MQ to 6.0.2.2 or above.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
barda900 |
Posted: Sun Dec 09, 2007 10:55 am Post subject: |
|
|
Newbie
Joined: 08 Dec 2007 Posts: 5
|
fjb_saper wrote: |
well if you've read the documentation you should know by now that publication and subscription are governed by the RFH2 header.
The broker does have a publication node, so put any topic in the RFH2 header with the publication command, pass it to a publication node and it will be published.
The same applies for the subscriptions. You just send them to the relevant system queue (as set by rfhutil)... |
I have no problems with understanding how to subscribe to a topic the manual way.
But what I'm actually interested in something like that:
publisherFlow: MQInput -> Compute -> Publish(MY_TOPIC_NAME)
subscriberFlow: Subscribe(MY_TOPIC_NAME) -> Compute -> MQOutput
Because it really seems weird that broker's flows cannot automatically
subscribe to messages published by the broker itself.
That's why I thought I was overlooking something obvious.
Let's say you want to develop such a subscriberFlow. What would you
do, fjb_saper?
fjb_saper wrote: |
You might want to upgrade MQ to 6.0.2.2 or above.
|
Hm, you're right. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 09, 2007 9:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The subscribe flow would look something like
MQInput-->Compute(add RFH2 with topic and options + subscriber qmgr & queue)-->MQOutput
Don't forget to use the request reply pattern so that you can check the reply queue for the return code from the subscription.
You might find a few surprises there...
We made it work since MQ 6.0.2.1 and broker 6.0.0.3 So if you did the upgrade to the current latest levels you should have no problems...
To be a little bit more precise: We have a publish flow that publishes the subscription as an XML message in the collective. Each broker is subscribing to that message and creates a local subscription for a clustered queue. Normal publishes and subscriptions are done with the local qualifier...
This allows us to put the subscription message onto one broker and subscribe them all to the local topic... As publishes are local we effectively have a load balancing model for our standard pub/sub messages. Of course message affinity is not allowed...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|