Author |
Message
|
adoyle65 |
Posted: Thu Mar 31, 2005 12:13 pm Post subject: MQ JMS PUB SUB |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hello,
I have read through many postings on this topic but have found the answer difficult to find. Let me first say I know nothing about Websphere or JMS.
We have an app server and a web server running on a windows box. We have a broker and its queue manager running on an AIX box. We want the app server to be able to subscribe to and publish messages using the broker on the AIX box. What is the setup we need to follow? We believe that we have to run the MQJMS_*.* script to create some queues, why? This is on the AIX box? Do we need a queue manager on the windows box, or can websphere connect directly to the queue manager on the AIX machine?
If anyone can help it would be greatly appreciated. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 31, 2005 12:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
First of all you need your setup to be complete and functioning.
If your MQ server is running on the AIX box, where would your broker be running (hint on top of an MQ Server).
Once your MQ Server and broker are setup you need to define what will go into your JNDI environment.
As for the connections: Yes your Win Web/App server can connect directly to the MQ Server on the AIX box using a client connection.
Just be aware that unless you pay for the extended transactional client, you cannot do a 2 phase commit with a client connection.
To do a 2 phase commit the Web server (transaction coordinator) and MQ Server (XA resource) need to be on the same box.
Enjoy  |
|
Back to top |
|
 |
adoyle65 |
Posted: Thu Mar 31, 2005 12:48 pm Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi there,
Our broker and qmgr are both running on an AIX box.
Not really sure what the setup being complete and functioning means.
The broker and qmgr are being used by other applications with no issues.
The intent is for an message driven bean to subscribe to a topic and retrieve messages from its subscription queue.
I guess we are having trouble because this is our first attempt at pub sub.
Any help would be appreciated.
Regards |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 31, 2005 12:56 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Just read carefully the using Java manual. (see docu button on top)
With what you intend you should be having little to no problem.
You did not specify what kind of WAS you are running.
Make sure the Classpath and all the other requirements for the MQ connection are done properly. Have MQ and WAS admin get their heads together.
Remember to use a TopicConnectionFactory for topics (pub/sub) and a QueueConnectionFactory for point to point.
Enjoy |
|
Back to top |
|
 |
adoyle65 |
Posted: Thu Mar 31, 2005 1:03 pm Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hey,
Where is this docu button?
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Thu Mar 31, 2005 1:13 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Where is this docu button? |
At the top of this very page you are reading.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Michael Dag |
Posted: Thu Mar 31, 2005 1:22 pm Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
EddieA wrote: |
Quote: |
Where is this docu button? |
At the top of this very page you are reading.
|
Just realised... with Firefox these buttons did not always show,
now that I am on 1.02 the buttons show, but not the dropdowns as in IE  _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
adoyle65 |
Posted: Thu Mar 31, 2005 1:25 pm Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hey,
Do you mean the blue menu at the top of the page?
Thanks |
|
Back to top |
|
 |
Michael Dag |
Posted: Thu Mar 31, 2005 1:26 pm Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
adoyle65 wrote: |
Hey,
Do you mean the blue menu at the top of the page?
Thanks |
Yes! _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Mar 31, 2005 1:49 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
The following URL:
http://www.developer.ibm.com/tech/faq/individual?oid=2:83352
gives details on setting up a couple of jms sample programs that run outside of the app server. It gives information regarding the setup of the JMS definitions. Even though it isn't for the app server, you might find it helpful. |
|
Back to top |
|
 |
adoyle65 |
Posted: Mon Apr 18, 2005 9:29 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hello,
We have managed to get some of this working but when in testing our app server crashes we get an error
Subscription has an active TopicSubscriber
Does anyone have any ideas?
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Apr 18, 2005 10:12 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
My guess would be that you are not deregistering your subscribers. If you are using the MA0C broker, the dumpbroker.java program at:
http://www.developer.ibm.com/tech/sampmq.html
can be used to see who is active. It would also be nice to see the exact exception that is being thrown. |
|
Back to top |
|
 |
adoyle65 |
Posted: Mon Apr 18, 2005 10:22 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi,
I know nothing about Java or JMS how are you supposed to deregister a subscriber? Can you deregister a subscriber if your app crashes? We have a durable subscriber and we get this error message and the previous text MQJMS3023.
Hope this helps.
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Apr 18, 2005 1:27 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
When you mentioned your app crashing, I think that is probably what is causing your problem. You never disconnect from the qmgr, so your subscriber is left active. You then try to come right back with the same subscriber and get a message that you are already active. I would think that this would clear itself up when WMQ recognized you've gone away and closes the connection. |
|
Back to top |
|
 |
adoyle65 |
Posted: Tue Apr 19, 2005 3:56 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi bower5932,
I would have thought that our broker would have cleared up the subscritpion but this does not seem to be happening. Any ideas as to how we might resolve this. Apparently in production I am led to believe that it is not uncommonn to recycle the app server during the day, so we will be faced with this problem in prod.
Thanks |
|
Back to top |
|
 |
|