Author |
Message
|
ashu |
Posted: Thu Jan 31, 2008 11:06 pm Post subject: C++ subscriber / publisher to MQ broker |
|
|
 Centurion
Joined: 11 Nov 2006 Posts: 132
|
Hello all,
Quote: |
This query must have been already addressed in this forum, of which I am sure, so I am expecting a pointer rather than an answer at this point... |
Query:
I have been trying my hands with MQ JMS and have followed all the steps given in most of the text, to successfully,
1. Starting the broker service for the Qmgr.
2. Configuring the QMgr to talk to the JMS publisher and subscriber
3. Writing Java applications that are publishers and subscribers.
All is well till this point.
Quote: |
My problem is how can I use the broker to interact with non-JAVA based applications trying to be either publishers or Subscribers? |
I guess I have been clear in putting forth my query...
Hope to get a pointer for further reading...or implementation  _________________ Ashu
"It is simple to be Happy but difficult to be Simple" |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 01, 2008 1:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
The broker doesn't mind especially if the publishers & subscribers are Java or not, so long as the messages are properly formatted.
I'd suggest that non-Java applications use the XMS libraries for simplicity, but it's not essential. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ashu |
Posted: Fri Feb 01, 2008 2:21 am Post subject: |
|
|
 Centurion
Joined: 11 Nov 2006 Posts: 132
|
A JMS application (...which is usually Java) uses TopicConnectioFactory and JNDI look up which are all JAVA specific things...more appropriately are in compliance with the JMS specs...
Do we have some thing similar for a C++ application or does the C++ app simply treat the topic as a normal Q and puts messages on it (if it has to act like a publisher) and let the broker take care of forwarding it to the publishers...!!!?
and what if the C++ app has to act as a Subscriber? how will the application register itself with the broker.
Hope I am asking the right questions???!!!  _________________ Ashu
"It is simple to be Happy but difficult to be Simple" |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 01, 2008 2:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ashu wrote: |
does the C++ app simply treat the topic as a normal Q and puts messages on it (if it has to act like a publisher) and let the broker take care of forwarding it to the publishers...!!!?
and what if the C++ app has to act as a Subscriber? how will the application register itself with the broker.
|
Publish / subscribe is built on the top of normal queues; it's just a futher layer of abstraction between putting and getting applications. So publications and subscription requests are simply messages with headers and contents that are described in the Pub/Sub manual.
Java applications can wrap these up in the JMS standard, non-Java wrap them up in the XMS. But neither has to. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ashu |
Posted: Fri Feb 01, 2008 2:39 am Post subject: |
|
|
 Centurion
Joined: 11 Nov 2006 Posts: 132
|
I was under the impression that the broker keeps record of all the subscribers on a topic ....is it correct . If so then it must be exposing some interface for the same ( making all the subscribing applications to abid to certain rules if they expect to be notified by the broker). _________________ Ashu
"It is simple to be Happy but difficult to be Simple" |
|
Back to top |
|
 |
ashu |
Posted: Fri Feb 01, 2008 2:52 am Post subject: |
|
|
 Centurion
Joined: 11 Nov 2006 Posts: 132
|
Quote: |
Java applications can wrap these up in the JMS standard, non-Java wrap them up in the XMS. But neither has to |
XMS is acceptable...but I'm unable to grasp the meaning of the bold line in the above quote.  _________________ Ashu
"It is simple to be Happy but difficult to be Simple" |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 01, 2008 3:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ashu wrote: |
I was under the impression that the broker keeps record of all the subscribers on a topic ....is it correct |
Yes
ashu wrote: |
If so then it must be exposing some interface for the same |
No it mustn't. All subcribers must register their subscription with the broker in the same way the publishiers must register the publication; both of which involve the messages I mention not an API, and both of which are documented in the manual I mentioned!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 01, 2008 3:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ashu wrote: |
Quote: |
Java applications can wrap these up in the JMS standard, non-Java wrap them up in the XMS. But neither has to |
XMS is acceptable...but I'm unable to grasp the meaning of the bold line in the above quote.  |
Neither class of application has to use the supplied libraries, it's just more convienient. Both can generate the necessary headers manually if for any reason you can't or won't use the libraries.
Doesn't matter to the broker. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ashu |
Posted: Fri Feb 01, 2008 3:42 am Post subject: |
|
|
 Centurion
Joined: 11 Nov 2006 Posts: 132
|
Quote: |
Neither class of application has to use the supplied libraries, it's just more convienient. Both can generate the necessary headers manually if for any reason you can't or won't use the libraries. |
Now it is making some sense to me...
I will read the manual throughly... Thanks for your support...  _________________ Ashu
"It is simple to be Happy but difficult to be Simple" |
|
Back to top |
|
 |
|