|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Websphere MQ - Plublish/Subscribe |
« View previous topic :: View next topic » |
Author |
Message
|
rodtfo |
Posted: Tue Feb 10, 2009 7:40 am Post subject: Websphere MQ - Plublish/Subscribe |
|
|
Newbie
Joined: 10 Feb 2009 Posts: 2
|
Hello,
We are attempting to receive messages from WBI environment into a standalone WebSphere MQ environment. Once the messages are received from the WBI environment on a queue, we would like to distribute the messages via the publish/subscribe model. The receiving WMQ environment has one queue manager with a broker started. My question is how do you put messages inside a publish subscribe model? The publisher is WMQ queues and the subscribers are also WMQ queues. If I have messages in a queue how do I get them going in the pub/sub model?
I am reading the Publish/Subscribe book and it is not clear on whether you must write a script or program to publish messages/ and subscribe to such messages. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 10, 2009 7:47 am Post subject: Re: Websphere MQ - Plublish/Subscribe |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rodtfo wrote: |
I am reading the Publish/Subscribe book and it is not clear on whether you must write a script or program to publish messages/ and subscribe to such messages. |
If you don't have something (script or program) publishing messages, where does the data come from? The queue manager won't generate it spontaniously!
Much the same is true of subscriptions; the queue manager has no interest in the data, it's going to be an external process of some kind consuming the data.
This is so blindingly obvious (even by my standards) I suspect I've misunderstood the question. You might need to rephase it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
manicminer |
Posted: Tue Feb 10, 2009 7:53 am Post subject: |
|
|
 Disciple
Joined: 11 Jul 2007 Posts: 177
|
Perhaps you are using MQ7 and want to use the new pub/sub capabilities? (again just guessing like Vitor)
If you were doing that then it might be you want to use an alias queue which is an alias to a topic, then any messages put on that "queue" would be published. (assuming I remember my V7 stuff correctly, I've not looked at it for a while).
Either way, more info will help  _________________ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. |
|
Back to top |
|
 |
rodtfo |
Posted: Tue Feb 10, 2009 9:13 am Post subject: |
|
|
Newbie
Joined: 10 Feb 2009 Posts: 2
|
Hi Vitor,
Quote: |
If you don't have something (script or program) publishing messages, where does the data come from? The queue manager won't generate it spontaniously! |
Correct! The data (or messages) are coming from another environment and they reside on a standard queue. Our goal is to take the messages and rather than just randomly put them on application queues, we would like to publish various topics and have a model setup in which a process would select which topics it wants to receive messages (i.e. subscription).
I was just wondering if there were any administrative tools available that would allow you to do the publish/subscribe or do you have to write scripts/programs using the MQ commands, AMI, JMS, etc. to do this?
Manicminer, we are using WMQ 6.0..does 7.0 offer such a utility? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 10, 2009 9:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you have to examine the contents of the message to determine what topic to publish it on, you have to write a program to read the message and build the topic.
You can, for example, use Message Broker to do this, in which case you aren't writing a "program", but instead a "message flow", and most of the heavy lifting on reading and writing messages and parsing data is done for you. |
|
Back to top |
|
 |
dove-young |
Posted: Wed Feb 11, 2009 12:42 am Post subject: |
|
|
Newbie
Joined: 21 Feb 2008 Posts: 9
|
Your environment sees strange. It seems you have already had standard queues, say a local queue, and you are puting messages into them. Then you want the messages in your local queues to be distributed in pub/sub mode.
You need to think about new terms introduced in WMQ v7, such as topic, topic string and subscribe, etc.
In a typical pub/sub environment, you need define topic object and specify topic string to it, such as '/root/trunk/leaves'. Then you can write/configure your application to publish information on this topic sting. For example
Quote: |
amqspub '/root/trunk/leaves' QM1 |
In the mean time, you can configure another application to subscribe information from there. For example
Quote: |
amqssub '/root/trunk/leaves' QM1 |
Furthermore, if you don't want to modify your application to use publish api, you can define an alias queue which target is set to a topic, then you can just put messages to the alias queue and all these messages will be published. For example
Quote: |
DEF TOPIC(DOVEA) TOPICSTR(/AAA/DOVEA)
DEF QALIAS(ADOVEA) TARGTYPE(TOPIC) TARGET(DOVEA)
./amqspub '/AAA/DOVEA' QM1
./amqsput ADOVEA QM1
./amqssub '/AAA/DOVEA' QM1 |
|
|
Back to top |
|
 |
NotMe |
Posted: Wed Dec 23, 2009 11:16 am Post subject: |
|
|
Apprentice
Joined: 25 Nov 2009 Posts: 26
|
dove-young wrote: |
Furthermore, if you don't want to modify your application to use publish api, you can define an alias queue which target is set to a topic, then you can just put messages to the alias queue and all these messages will be published. For example
Quote: |
DEF TOPIC(DOVEA) TOPICSTR(/AAA/DOVEA)
DEF QALIAS(ADOVEA) TARGTYPE(TOPIC) TARGET(DOVEA)
./amqspub '/AAA/DOVEA' QM1
./amqsput ADOVEA QM1
./amqssub '/AAA/DOVEA' QM1 |
|
I am confused by this... After my configuration failed (see below link), I tried the above and it did not work and I guess the point of confusion is how do you run ./amqspub and ./amqsput back-to-back? I run the ./amqspub command and after I finish putting in my test data I then run ./amqsput? How does this work?
http://www.mqseries.net/phpBB2/viewtopic.php?t=51994 |
|
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
|
|
|
|