Author |
Message
|
sunnybab |
Posted: Tue May 23, 2006 8:18 pm Post subject: Multiple MQ Clients connectivty issue to single Queue Mgr |
|
|
Novice
Joined: 12 Jan 2006 Posts: 21
|
Hi all,
I have MQ 6.0 and WAS 5.1 setup .. There are two Solaris App Servers ( app1 and app2 ) running WAS 5.1 and MQ 6.0 Client.
and third Solaris system ( MQ1) running MQ 6.0 Server with Queue manager /Listener and queues defined .
MQ Listener is enabled on both Client systems ( App1 and App2) .
This Setup works fine as long as I have one AppServer either ( App1 or App2) running.
As soon as I start the second server it throws below exception :
J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMSQueueConnectionFactory. The exception which was received is javax.jms.JMSException: MQJMS2008: failed to open MQ queue
since both App1 and App2 are trying to connect to same System ( MQ1) QM /Queues and Pick up the message from there..
JMS queue Connection factory and MQ Queue Destinations are defined in CLIENT mode on ( app1 and app2) to point to MQ1 QM and queues .
Any ideas on how to configure so both client machines ( app1 and app2) can pick up the messages from MQ1 system ?
Thanks in advance
sunny |
|
Back to top |
|
 |
8davitt |
Posted: Tue May 23, 2006 11:21 pm Post subject: |
|
|
Apprentice
Joined: 06 Feb 2003 Posts: 37 Location: Seated in front of monitor
|
|
Back to top |
|
 |
Pieper |
Posted: Thu May 25, 2006 2:28 am Post subject: |
|
|
Newbie
Joined: 25 May 2006 Posts: 4
|
Hi,
I have the same question. This "cloning" is only a feature for topics, isn't it? I think the question was about receiving messages by two queue listeners. (round-robin mechanism or similar)
Each messages should only by delivered to one client, but in a load-balacing fasion.
Pieper |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 25, 2006 2:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
There is no load balancing that way. It is a first come first serve. What you need is to ensure that the queue is not opened in exclusive mode and have 2 or more consumers active on the queue.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Pieper |
Posted: Thu May 25, 2006 3:09 am Post subject: |
|
|
Newbie
Joined: 25 May 2006 Posts: 4
|
fjb_saper wrote: |
There is no load balancing that way. It is a first come first serve. What you need is to ensure that the queue is not opened in exclusive mode and have 2 or more consumers active on the queue.
Enjoy  |
Yes, load-balancing was wrong. My main intention is to have a resilience feature.
How can I ensure via JMS that the queue is not opened exclusive?
I want to connect two Spring 2.0 MessageListener POJOs with onMessage() methods to the queue. In this case I have two consumer, haven't I?
Thanks in advance
Pieper |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 25, 2006 3:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Part of it is in the MQ setup. Part of it is in the JMS setup.
You need to make sure in each case that you do not have any process that is opening the queue in exclusive mode. This includes any other process accessing the queue (non JMS or here involved process as well).
Then you define on each box / app server an MDB and you should be doing fine. Make sure that each appserver is using its own QueueConnectionFactory.
Enjoy
[addendum]The JMS part of the setup is in the setup of the queue as a javax.jms.Destination. There are a number of properties passed when you set up the queue in JNDI. Here you specify as well the default type of access.
Hint -- do not leave the access as default but make it explicit. Make sure it is defined as shared --. To achieve greater throughput when the order of consumption is not important you can set up the MDB to have multiple instances in the appserver.[/addendum] _________________ MQ & Broker admin |
|
Back to top |
|
 |
Pieper |
Posted: Thu May 25, 2006 8:48 am Post subject: |
|
|
Newbie
Joined: 25 May 2006 Posts: 4
|
Thanks for your advice.
Two questions are still open:
- which JMS properties for Websphere MQ do I have to set?
- I am not using MDBs in an appserver, but standalone MDBs as a feature of Spring Framework 2.0. Does your answers also apply to that?
Pieper |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 25, 2006 9:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Pieper wrote: |
- which JMS properties for Websphere MQ do I have to set? |
The ones that control the open mode of the Queue Connection.
Pieper wrote: |
- I am not using MDBs in an appserver, but standalone MDBs as a feature of Spring Framework 2.0. Does your answers also apply to that? |
I'll skip my usual rant about using J2EE components outside a J2EE container. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Pieper |
Posted: Thu May 25, 2006 9:10 am Post subject: |
|
|
Newbie
Joined: 25 May 2006 Posts: 4
|
jefflowrey wrote: |
Pieper wrote: |
- which JMS properties for Websphere MQ do I have to set? |
The ones that control the open mode of the Queue Connection.
|
Are you aware of the name of the property?
Thanks,
Pieper |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 25, 2006 9:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
|