Author |
Message
|
girim |
Posted: Tue May 22, 2007 8:13 pm Post subject: Mutliple Queue consumers |
|
|
Newbie
Joined: 22 May 2007 Posts: 2 Location: Chennai India
|
In my environment I have four queue consumers (listeners) consuming messages from the same queue. Some times, in a very rare scenario, the same message is being consumed by more than 1 consumer ending up in duplication of the process. Is there a way to over come this by still having multiple consumers pointing to the same queue. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Tue May 22, 2007 10:50 pm Post subject: Re: Mutliple Queue consumers |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
athresh2001 wrote: |
In my environment I have four queue consumers (listeners) consuming messages from the same queue. Some times, in a very rare scenario, the same message is being consumed by more than 1 consumer ending up in duplication of the process. Is there a way to over come this by still having multiple consumers pointing to the same queue. |
Can you duplicate it problem ?
Maybe it is problem with sending application. have you checked it ?
Do you log messages on sending and receiving side ? _________________ Marcin |
|
Back to top |
|
 |
girim |
Posted: Tue May 22, 2007 10:54 pm Post subject: |
|
|
Newbie
Joined: 22 May 2007 Posts: 2 Location: Chennai India
|
Yes I was able to duplicate it. Actually when we have just one consumer we did not get this problem, when we added another consumer for the same queue, we had this problem. There is no problem with the application sending the messages. This we were able to confirm by stopping all the listeners to the queue and verified the queue depth and the number of messages transmitted by the sending application. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 23, 2007 3:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Is it possible that one consumer is rolling the message back? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
zpat |
Posted: Wed May 23, 2007 4:08 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
MQ does not allow the same message to be consumed more than once.
We have many multi-threaded JMS applications sharing queues.
You are either browsing it or getting under syncpoint and then it is rolled back (check the MQMD.back count) and re-processed.
If you MQGET under syncpoint you must check for backed out messages and send them to a poison queue if repeatedly processesd or you will get a loop. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 23, 2007 4:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
athresh2001 wrote: |
Yes I was able to duplicate it. |
If you're absolutely certain it's not an application issue (e.g. a rollback as jefflowrey suggests) than you need to raise a PMR with IBM, especially if you're using the latest version. It would be a very serious bug if it's been introduced.
Certainly this works on previous versions I've done it on. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Cyrille Le Clerc |
Posted: Wed May 23, 2007 7:54 am Post subject: Re: Mutliple Queue consumers |
|
|
Novice
Joined: 23 May 2007 Posts: 12 Location: France
|
Hello athresh,
Just to check, what is the isolation level of these consumers ?
Do these consumers share the same Virtual Machine ? The same JMS Connection Factory ? The same JMS connection ? The same JMS session (warning : JMS sessions are NOT thread safe) ?
Are your sessions transacted ? Whats is the acknowledge mode ?
If the consumers share some java components, can you show us the simplified code (just the JMS stuff) ?
athresh2001 wrote: |
... having multiple consumers pointing to the same queue. |
Cyrille _________________ Cyrille Le Clerc
cyrille@cyrilleleclerc.com
cleclerc@xebia.fr
http://blog.xebia.fr |
|
Back to top |
|
 |
|