Author |
Message
|
woodoo2k |
Posted: Thu Aug 21, 2008 12:29 pm Post subject: JMS Two MDB instances getting two copies of message |
|
|
 Apprentice
Joined: 07 Feb 2005 Posts: 28 Location: USA
|
Hi Fellas!
How are you doing?
Well i have a problem with default behaviour or MQ when used with Weblogic JMS Server as a foreign JMS Provider.
Let me explain it a bit.
I have two Weblogic managed servers running on Sun Solaris that use MQ as a foreign JMS provider. My application is deployed on both these servers ( two instances in all) and the MDB in it reads from same queue/queue manager.
My problem is that when I put a single message to the queue, it ends up in both the servers. I expect that only one of the Applications should get the message as the connection to the Queue Manager is opened within SYNCHPOINT.
Could someone give me some pointers as to why is MQ behaving in this manner?
There is nothing special about the configuration. I am using most default configuration ( No Distributed JMS etc.)
Any help / pointers are highly appreciated!
Thanks! |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 21, 2008 5:38 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Stop the target app (consumers)... and put a message. How many messages do you see? Did you check all the relevant queues including the DLQ?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
David.Partridge |
Posted: Thu Aug 21, 2008 11:17 pm Post subject: |
|
|
 Master
Joined: 28 Jun 2001 Posts: 249
|
Are they browsing (QueueBrowser) or getting (QueueReceiver)? I believe that the default behaviour of browse will allow both consumers to see the same message.
Obviously if they are getting, then only one should see the message. _________________ Cheers,
David C. Partridge |
|
Back to top |
|
 |
woodoo2k |
Posted: Fri Aug 22, 2008 5:47 am Post subject: |
|
|
 Apprentice
Joined: 07 Feb 2005 Posts: 28 Location: USA
|
Thank you for the responses.
Each message on the queue has a unique ID which is used to track it within application. We see same ID being processed by both app instances.
The apps are JMS applications deployed on Weblogic 9.2.
Actually the situation is that earlier these two instances were running on two separate queue managers but using same queue names within a MQ Cluster.
Now they have been re-configured to use same queue on single queue manager and clustering has been removed.
The senders are still sending to the same queue and sending single copy only as before.
Now both the JMS servers are receiving a copy of message.
I checked with application team to see if they are setting ACKNOWLEDGE MODE property of session, but they are not.
Can you tell me if this property affects the removal of message from MQ?
Any help is highly appreciated.
I am still investigating but have not found any viable answers yet.
Thanks in advance for your advice!! |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 22, 2008 10:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
woodoo2k wrote: |
Thank you for the responses.
Each message on the queue has a unique ID which is used to track it within application. We see same ID being processed by both app instances. |
Make sure that as the app logs the msgID it also logs the msg delivery count
This is not an unusual situation. The first time the message might have been rolled back for whatever reason and now the other MDB is picking it up for reprocess...
woodoo2k wrote: |
The apps are JMS applications deployed on Weblogic 9.2.
Actually the situation is that earlier these two instances were running on two separate queue managers but using same queue names within a MQ Cluster.
Now they have been re-configured to use same queue on single queue manager and clustering has been removed.
The senders are still sending to the same queue and sending single copy only as before.
Now both the JMS servers are receiving a copy of message. |
See my above comment
woodoo2k wrote: |
I checked with application team to see if they are setting ACKNOWLEDGE MODE property of session, but they are not.
Can you tell me if this property affects the removal of message from MQ?
Any help is highly appreciated.
I am still investigating but have not found any viable answers yet.
Thanks in advance for your advice!! |
Your MDB would normally be transacted (requires new) and use Session.AUTO_ACKNOWLEDGE.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|