|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Outcome of MQCMIT call? |
« View previous topic :: View next topic » |
Author |
Message
|
jsware |
Posted: Tue May 08, 2007 4:30 am Post subject: Outcome of MQCMIT call? |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
I am looking at what needs to be done by an application to always remain in a determinate state when dealing with CC/RC codes from MQ. This is just an application that gets or puts messages (no database updates etc).
To do this, its a given that you must use local transactions, then if anything goes wrong (even an application crash) you know the transaction gets rolled back.
On the MQCMIT call, you can get an MQRC_CONNECTION_BROKEN reason, which if you're using MQ Client indicates that the MQCMIT call *may* have completed successfully. This leaves an MQ application in an indeterminate state (did that commit or not?)
Thus another rule would be "use bindings" mode.
However, is there any chance that an MQCMIT call can return a reason code that implies the commit might/might not have worked in bindings mode? If so, is there a clarifying statement buried in IBM's documentation to this effect? _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
tleichen |
Posted: Tue May 08, 2007 10:38 am Post subject: Re: Outcome of MQCMIT call? |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
My guess would be if the MQCMIT call got a MQRC_CONNECTION_BROKEN, it indicates the commit could not be done. In the past when I have gotten this type of error, it was always because a previous MQ operation failed with a return code that was not checked, thus subsequent attempts at API calls were made yielding an MQRC_CONNECTION_BROKEN error. I would be interested to know if you find that this is not the case.  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
markt |
Posted: Tue May 08, 2007 11:35 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
You can assume nothing about the state of the transaction after a return code such as connection_broken. Unless you get a transaction committed or transaction backed out response, there are NO guarantees of the state, except that the commital or backout will have occurred for all operations in the transaction so that the correct state is maintained.
There is no difference between local and client connections, other than that client connections are more "likely" to fail because of the intervening network - the levels of transactional guarantee are identical.
And there is no difference between MQ and any other resource manager such as a database in this respect. Go read the literature on transactional system designs if you don't believe it.
This is standard behaviour for ALL resource managers: a non-deterministic return code means that your application cannot know the outcome of the transaction without doing some inspection on restart/recovery. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 08, 2007 11:51 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
markt wrote: |
a non-deterministic return code means that your application cannot know the outcome of the transaction without doing some inspection on restart/recovery. |
I guess the difficulties of doing inspection on a non-persistant message that was immediately consumed are left as an exercise... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jsware |
Posted: Tue May 08, 2007 11:51 pm Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
markt wrote: |
There is no difference between local and client connections, other than that client connections are more "likely" to fail because of the intervening network - the levels of transactional guarantee are identical. |
This is what I had already believed, except that the IBM manuals state:
Quote: |
For MQ client applications, it is possible that the call did complete successfully, even though this reason code is returned with a CompCode of MQCC_FAILED. |
Which seems to imply that MQCMIT would never succeed, but return a failure code in bindings mode.
However, I understand what you are saying. I am hoping that there would be a specific statement in the IBM MQ documentation  _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|