|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Syncpoint, b egin() and cmit() |
« View previous topic :: View next topic » |
Author |
Message
|
jeevan |
Posted: Sun Aug 20, 2006 10:42 am Post subject: Syncpoint, b egin() and cmit() |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Hey MQ Gurus,
I have hard time to understand Syncpoint. What I understood is as follows:
if we like our transaction to be manipulated , we start the transaction with BEGIN() call. Also, we may set some parameters somwether ( i am not a appl guy, i am admin and dun know much appl dev). The transaction until we make an another call CMIT() or backout() are within our control. IF some reason, we do not like to make that transaction completed, we can backout or if problem happens, we can recomit these transaction. Is this understanding correct?
Please clarify. I read the rebbood already. |
|
Back to top |
|
 |
wschutz |
Posted: Sun Aug 20, 2006 10:53 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Almost ... you only can use BEGIN() if you have a "two-phase" commit ... meaning two or more resource managers (like MQ and DB/2) ...
If you are only using MQ and not coordinating the transaction with another resource manager, then you only need the MQCMIT() or MQBACK() verbs. _________________ -wayne |
|
Back to top |
|
 |
jeevan |
Posted: Sun Aug 20, 2006 10:57 am Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
How does it determine the begining point ( unit or work ? I am not sure but i think this is called unit of work right?) for mqcmit() or mqbsck()? or It is between the previous mqcmit() or mqback()? |
|
Back to top |
|
 |
jeevan |
Posted: Sun Aug 20, 2006 11:07 am Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Let me explain. An application is putting message. we can program such that after 30 message, we can test some condition, and if that criteri meets, we comit otherwise, we backout. Is this how it works. the transaction between the two QMCMIT () or MQCMIT() and MQBACK() or two MQBACK() are treated as an unit of work.
where comes the syncpoint comes into scene? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Aug 20, 2006 11:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The setting of syncpoint is what allows you to take advantage of MQ as transaction coordinator. The unit of work is like in a DB. Whatever you changed untill you commit/rollback. For multiphase commit it is whatever is between begin() and commit/rollback.
Using this you have to be carefull about handling correctly "poison messages". Poison messages are messages that your application does no know how to process. Typically you might want to process any given UOW multiple times (backout threshold) untill you identify it as having a problem. This is due to different resource availability... Now if your UOW has a problem and you always need to roll it back you enter an endless loop hence "poison message".
The best way to deal with this is to put the "poison UOW" to a backout queue and go on with processing the rest of the messages as long as the order of the processing is of little importance. You can then deal with the messages on the backout queue at a different time and have them inspected manually...
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|