Author |
Message
|
kaitlyn |
Posted: Tue Aug 01, 2006 11:35 am Post subject: Backout problem |
|
|
Apprentice
Joined: 24 Nov 2004 Posts: 25
|
We are running WebSphere 5.1.1.8 and using MQ Series 530.12. WebSphere lives on one server with MQ on another. As a result, we are using the client on the WebSphere box. The problem that we are running into is that our expecation is that when a message is not processed successfully, it will go the the Falure queue and the listener will NEVER stop. This, for the most part, works as it should. However, sometimes, and I can't explain exactly why, the listener will stop. When this happens, it will restart again in 60 seconds, but it just keeps happening (on and off, on and off, etc.) until it bogs the system down so bad we have to restart it. Our intent is to have these messages process in order, one at a time. If one fails, move it to the failure queue and move on to the next message. Here's our config information:
LISTENER INFORMATION:
Name............................ MainQListener
Initial State................... Started
Description..................... Listener for the main Q
Connection factory JNDI name.... jms/MQPROVIDER
Destination JNDI name........... jms/MainQ
Maximum sessions................ 1
Maximum retries................. 2
Maximum messages................ 1
QUEUE INFORMATION:
Name..................... MainQ
JNDI Name................ jms/MainQ
Description.............. Main queue
Persistence.............. APPLICATION DEFINED QUEUE
Priority................. APPLICATION DEFINED
Specified Priority....... 0
Expiry................... APPLICATION DEFINED
Base Queue Name.......... MainQ
Base Queue Manager Name.. MAIN.QUEUE.MANAGER
Native Encoding.......... Don't use
Integer Encoding......... Normal
Decimal Encoding......... Normal
Floating Point Encoding.. IEEENormal
Target Client............ JMS
Main Q CONFIG:
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME(MainQFailure)
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(MainQ) CRDATE(2005-04-05)
CRTIME(17.05.47) ALTDATE(2006-05-2
ALTTIME(18.47.05) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(YES) MAXDEPTH(500000)
MAXMSGL(104857600) BOTHRESH(1)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(0)
MainQFailure CONFIG:
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(AddressStandardizerFailure) CRDATE(2006-05-2
CRTIME(18.48.52) ALTDATE(2006-08-01)
ALTTIME(14.30.35) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(YES) MAXDEPTH(500000)
MAXMSGL(104857600) BOTHRESH(1)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(4)
Cany anyone tell me if I have something wrong here? Help!!!! |
|
Back to top |
|
 |
vennela |
Posted: Tue Aug 01, 2006 4:30 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
If one fails, move it to the failure queue and move on to the next message. |
You can use BackOut queues and BackOut count. But please understand that it is the duty of the application to move the message to the BackOut queue. |
|
Back to top |
|
 |
kaitlyn |
Posted: Thu Aug 03, 2006 4:37 am Post subject: |
|
|
Apprentice
Joined: 24 Nov 2004 Posts: 25
|
Quote: |
You can use BackOut queues and BackOut count. But please understand that it is the duty of the application to move the message to the BackOut queue. |
We are using JAVA and when exceptions are thrown, we catch them and do not use JAVA code to move messages. This, to me, seems VERY ineffecient to do it in JAVA when that's what MQ does for you. Am I missing something? Why not let MQ do what it does best (deal with messages) and let JAVA deal with the database and UI's? If this is not the responsibility of MQ, then why does it work (most of the time) the way we have designed it? I'm confused... |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 5:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
kaitlyn wrote: |
This, to me, seems VERY ineffecient to do it in JAVA when that's what MQ does for you. Am I missing something? |
Yes.
MQ does NOT handle backouts for any application. It merely provides tools for applications to perform backous.
kaitlyn wrote: |
Why not let MQ do what it does best (deal with messages) and let JAVA deal with the database and UI's? |
You don't expect the database to automatically know that a transaction has failed and needs to be rolled back, right? You don't expect JAVA to know that a user has entered character data into a numeric field, right?
kaitlyn wrote: |
If this is not the responsibility of MQ, then why does it work (most of the time) the way we have designed it? I'm confused... |
You get a bad message coming in. It causes the processing to fail. You haven't defined backout processing. The message stays on the queue, and attempts to reproccess it are made continuously.
BUT, you are using WAS. So, perhaps, you are using JMS. IF you are using JMS, then you can define properties on your Queue Destination that will cause the JMS Provider in WAS to handle the backout processing for you, and your application doesn't have to have specific code written to do this.
Do some searches in the Java/JMS forum for "poison message". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kaitlyn |
Posted: Thu Aug 03, 2006 10:57 am Post subject: |
|
|
Apprentice
Joined: 24 Nov 2004 Posts: 25
|
Quote: |
BUT, you are using WAS. So, perhaps, you are using JMS. IF you are using JMS, then you can define properties on your Queue Destination that will cause the JMS Provider in WAS to handle the backout processing for you, and your application doesn't have to have specific code written to do this. |
Perhaps I was not clear. If you look at my original post, the LISTENER INFORMATION and QUEUE INFORMATION headings are what is configured in WAS. Yes, we are using JMS, so my assumption (not being an expert) is that it is being handled by WAS through JMS. I'm assuming that the Maximum retries parameter is for (doc says "The maximum number of times that a message can be backed out. If this threshold is reached, the message is requeued on the backout queue."). With that being said, am I to assume that since I am having problems with this, that it would be a WAS problem and not MQ? |
|
Back to top |
|
 |
vennela |
Posted: Thu Aug 03, 2006 12:19 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
If you are using WAS and an MDB to pick messages, and if you have set the right parameter values to backout, yes, WAS will take care of putting in the BackOut queue |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 12:59 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Vennella, after missing a thing or two in the first message here ( ), I read through it again.
My poor brain seems to think that the JMS settings are correct to allow for backout to happen. But I don't trust my poor brain right now. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 03, 2006 3:34 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well I don't see any mention of the MQ config.
First make sure a backout threshold is set on the queue.
Second make sure your MDB has a retry count > backout threshold on the queue.
Third if no back out queue is specified the message will go to the DLQ (we expect you defined a DLQ).
Fourth in any other case the MDB will stop processing on a poison message.
Read the MQ and WAS manuals.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 5:15 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
fjb_saper wrote: |
Well I don't see any mention of the MQ config.
First make sure a backout threshold is set on the queue. |
Quote: |
Main Q CONFIG:
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME(MainQFailure)
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(MainQ) CRDATE(2005-04-05)
CRTIME(17.05.47) ALTDATE(2006-05-2icon_cool.gif
ALTTIME(18.47.05) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(YES) MAXDEPTH(500000)
MAXMSGL(104857600) BOTHRESH(1) |
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 03, 2006 7:02 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Knew I must have missed something... _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 04, 2006 1:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Kaitlyn -
I'm going to say that a) apparently none of us are able to read your message properly, and b) everything you've shown us looks right.
So probably something else is going on - like the MDB class is doing something funny for certain messages, or you've found a bug in WAS 5.1.1.8.
It is a bug in WAS, and not a bug in MQ - because the it's the MDB Listener Port that's misbehaving.
Just to double-check... you did grant any needed MQ Authorities for the WAS user on the backout queue, right? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 04, 2006 2:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And grant needed authorities to the DLQ (usually via Alias) if you did not specify a backout queue.... _________________ MQ & Broker admin |
|
Back to top |
|
 |
|