|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Managing transactions over multiple queues |
« View previous topic :: View next topic » |
Author |
Message
|
kenhallvm |
Posted: Fri Jun 21, 2002 3:53 am Post subject: Managing transactions over multiple queues |
|
|
Newbie
Joined: 21 Jun 2002 Posts: 1
|
How does one go about managing messages in different queues as a single unit of work? I know I can use syncpoint on a number of messages in a single queue but is there a higher level of transaction management that I can use where the messages are in two (or more) different queues?
Thanks in advance
Ken |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Jun 21, 2002 5:01 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
use MQBEGIN/MQCMIT/MQBACK _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
StefanSievert |
Posted: Fri Jun 21, 2002 12:16 pm Post subject: Re: Managing transactions over multiple queues |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
kenhallvm wrote: |
How does one go about managing messages in different queues as a single unit of work? I know I can use syncpoint on a number of messages in a single queue but is there a higher level of transaction management that I can use where the messages are in two (or more) different queues?
Thanks in advance
Ken |
Ken,
the scope of your UOW is the connection handle returned from MQCONN, not the object handle of the MQOPEN (that's why the connection handle is the argument to the CMIT/BACK calls ). If you only have MQ resources in your UOW, you don't need the MQBEGIN verb. Your unit of work starts with the first syncpointed PUT/GET and ends with MQCMIT or MQBACK.
So, you could have a logic like this:
Code: |
MQCONN
MQOPEN q1
MQOPEN q2
MQGET q1 sync
MQPUT q2 sync
if no_error MQCMIT
else MQBACK
MQCLOSE q1
MQCLOSE q2
|
You could even MQCLOSE the queues before you commit or backout without affecting the unit of work. Again, it's tied to the connection handle, not to any of the object handles, so you can coordinate put/get operation across multiple queues.
Does this make sense? I hope so (my brain is not with me today, beacuse I got up at 3:30am to watch soccer... ).
Have a nice weekend,
Stefan _________________ Stefan Sievert
IBM Certified * WebSphere MQ |
|
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
|
|
|
|