Author |
Message
|
tapak |
Posted: Tue Oct 24, 2006 11:36 am Post subject: Message Lost on Single phase transaction on Client Mode |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
We are testing the transaction scenario for client connection in single mode .
In our test we got the message in transaction mode (MQC.MQGMO_SYNCPOINT;)
Then remove the network code before making the commit. We got a 2009 error after that . But the message seems to be removed from the queue even though I didnt do a successful commit.
Is this an expected behaviour or message is supposed to be removed from the queue only if a succesful commit is made ?
Please let me know if I missed out anything in the code. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 24, 2006 11:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You won't be able to see it if it's not committed or rolled back.
You haven't done anything to explicitly commit it.
You haven't done anything to explicitly roll back the transaction, either. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
zpat |
Posted: Tue Oct 24, 2006 12:05 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Hmm, how (or more to the point when) does the queue manager know the client connection has broken?
I would guess when some sort of channel disconnect interval expires it will rollback any uncommitted units of work. |
|
Back to top |
|
 |
tapak |
Posted: Tue Oct 24, 2006 12:18 pm Post subject: |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
Quote: |
You won't be able to see it if it's not committed or rolled back.
|
Jeff,
Does that mean , the message is removed (lost) from the queue eventhough I havent made a commit or message is in indoubt state as mentioned by zpat. If it is in indoubt state how do I get the message again .
Thanks, Deepak |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 24, 2006 12:39 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If a message has been PUT or GOT in syncpoint, but not commited, then it will be in doubt.
You can tell if this is case if the QDEPTH is greater than the number of visible messages.
There is a utility to resolve transactions - amqsrsvtn or some such. Check the System Admin guide.
There is also stuff in various places about default behavior for transactions with different APIs. Sometimes an abend will force an explicit commit, and a client app disappearing counts as an abend. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
tapak |
Posted: Tue Oct 24, 2006 12:40 pm Post subject: |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
I could see the uncommitted message on doing QUsage. I stopped the server con channel and the messages are rolled back to the queue . Thanks for the inputs. |
|
Back to top |
|
 |
tapak |
Posted: Tue Oct 24, 2006 1:20 pm Post subject: |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
Is there a way to monitor channels using Candle or other monitoring tools when the server connection channel has indoubt messages due to 2009 errors happening before commit.
Also in MQ53 we have to stop all the server con channels (even active channels) with the same name to retrieve the uncommitted messages.. Is there any other way to retrieve the message without stopping the channels.
I tried dspmqtrn .It shows "There are no prepared transactions. " Does this command work only for XA transactions ? |
|
Back to top |
|
 |
tapak |
Posted: Wed Oct 25, 2006 7:30 am Post subject: |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
Also is there a way to programmatically handle this condition i.e retrieving the uncommitted messages from the channel and reprocess it again . Or is there a configuration for server connection channel to retrieve the messages. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 25, 2006 7:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
tapak |
Posted: Wed Oct 25, 2006 7:51 am Post subject: |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
I used the dspmqtrn and rsvmqtrn command . But it doesnt do anything even though my QueueUsage shows uncommitted messages as 2 even after doing rsvmqtrn. Is dspmqtrn suppose to display pending transaction and rsvmqtrn suppose to resolve pending transaction.
I am doing single phase transaction in client mode . Is it that it works only for distributed transactions (2 phase).Here is the result of dspmqtrn and rsvmqtrn command.
Code: |
/opt/varmqm/usr> rsvmqtrn -a -m QMMQQA1
Any in-doubt transactions have been resolved.
/opt/varmqm/usr> dspmqtrn -m QMMQQA1
There are no prepared transactions.
|
|
|
Back to top |
|
 |
|