ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Multiphase Commit » 2PC?

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next
 2PC? « View previous topic :: View next topic » 
Author Message
bruce2359
PostPosted: Wed May 06, 2009 8:30 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

What you (and your application) will have are separate UofW's:
1) your app MQGETting a msg from a local qmgr and MQPUTting a msg to a transmission queue
2) the message channel agent on the Sending end of the channel MQGETting the msg from the transmission queue and sending it down the network to the remote qmgr; and the Receiving message channel agent MQPUTting the message to the destination queue (or DLQ)

In 1) above, once your app successfully MQPUTs the message in the transmission queue, your app believes that the 'transaction' has completed successfully. You can ask for report messages in the message that you send down the network that will let your local application find out about successful or failed delivery of the message to the remote queue; but there are issues with COA report messages.

An added thought for you: MQ is asynchronous by nature. Yes, you can write applications that behave synchronously; but MQ delivers messages to downstream qmgrs asynchronously. Once your app has MQOPENed a QRemote definition, the following MQPUTs are to a transmission queue, NOT to the destination queue on a remote qmgr.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Wed May 06, 2009 8:41 am    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

bruce2359 wrote:
What you (and your application) will have are separate UofW's:
1) your app MQGETting a msg from a local qmgr and MQPUTting a msg to a transmission queue
2) the message channel agent on the Sending end of the channel MQGETting the msg from the transmission queue and sending it down the network to the remote qmgr; and the Receiving message channel agent MQPUTting the message to the destination queue (or DLQ)

In 1) above, once your app successfully MQPUTs the message in the transmission queue, your app believes that the 'transaction' has completed successfully. You can ask for report messages in the message that you send down the network that will let your local application find out about successful or failed delivery of the message to the remote queue; but there are issues with COA report messages.


I did read about reports and we do not need to know that our Put Msg was recieved. So it looks like I caught a break there.

I'll have to do some reading on channel agents. That is not clear to me.

I short, are you saying that I can not do a single COMMIT for my Get and Puts? If this is true, then I DO need to use the BEGIN so I can do a global UoW to accomplish what I'm looking to do right OR do I need to read on doing a Cluster?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 06, 2009 8:59 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Quote:
I short, are you saying that I can not do a single COMMIT for my Get and Puts?

In MQs (digital) eyes, all MQPUTs and MQGETs are local. Thus, MQCMIT and MQBACK would only work for gets from local queues and puts to local queues - including transmission queues. So, no; you cannot comit messages to remote queues.

Quote:
If this is true, then I DO need to use the BEGIN so I can do a global UoW to accomplish what I'm looking to do

No. MQBEGIN will not help you. It is your apps statement of intention to make changes to MQ resources and possibly changes of other resource managers, like DB2. MQ does not support multi-qmgr resource changes.

Quote:
OR do I need to read on doing a Cluster?

No. Clusters will not help you. Cluster software sends messages asynchronously via a cluster-transmission queue across point-to-point channels just like regular non-cluster point-to-point channels.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 06, 2009 9:08 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Given you sparse understanding of things MQ, I ponder the wisdom of your application design. You want a guarantee that a message traversed the network to a remote qmgr and to the destination queue.

MQ makes no such guarantee. MQ assures message delivery. Assured delivery is explicitly defined in the manuals. In MQs architecture, a message may reside in a transmission queue waiting to be delivered, in the destination queue, or in a dead-letter queue.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Wed May 06, 2009 9:09 am    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

Really? WMQ does not allow MQCOMIT/MQBACK to work between multiple QMgrs?

It baffles me that I have a unique need. Is there some other technique to accomplish this need?

If I do a Put then purge the Get and there is a problem with the Get purge, I can purge the Put if I retain a messageID. But if the purge on the Put has prolems, then I'm out of luck. I run the risk of Putting the same message more than once.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 06, 2009 9:22 am    Post subject: Re: 2PC? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

jeremydp wrote:
Really? WMQ does not allow MQCOMIT/MQBACK to work between multiple QMgrs?

It baffles me that I have a unique need. Is there some other technique to accomplish this need?


Yes.

Allow MQ itself to move messages between Qmgrs, rather than making that your application's job.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Wed May 06, 2009 9:26 am    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

mqjeff wrote:
jeremydp wrote:
Really? WMQ does not allow MQCOMIT/MQBACK to work between multiple QMgrs?

It baffles me that I have a unique need. Is there some other technique to accomplish this need?


Yes.

Allow MQ itself to move messages between Qmgrs, rather than making that your application's job.


Can you give me something to look up? What is this called?


Thank you!
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 06, 2009 9:29 am    Post subject: Re: 2PC? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jeremydp wrote:
Can you give me something to look up? What is this called?


It's called "why you bought WMQ", it's what the rest of us are doing, and is explained quite well in the Intercommunication manual (available from the same place you got the APG & APR, or the link at the top of this page in extremis).


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 06, 2009 9:33 am    Post subject: Re: 2PC? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jeremydp wrote:
If I do a Put then purge the Get and there is a problem with the Get purge, I can purge the Put if I retain a messageID.


No you can't. Or you can, but it's not a task for the faint hearted and requires a level of security most applications are not allowed by most administrators.

jeremydp wrote:
I run the risk of Putting the same message more than once.


No you don't. See my most worthy associate's comments on assured delivery and my comments on "why you bought WMQ".

Do not try and prevent problems that WMQ will prevent for you. Or if you insist on trying to prevent them, use a TCP/IP connection and save yourself the WMQ license fee.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Wed May 06, 2009 10:22 am    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

Thank you all for your input. It's back to reading for me.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 06, 2009 11:48 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Multiple concurrent MQCONNects are allowed/supported on some platforms. The issue for you is multiple concurrnet UofWs, which are not supported. Again, the UofW is controlled by the ConnectionHandle. If you connect twice, you get two connection handles.

You would not be the first to try to invent your own UofW to satisfy this need. I caution your use of this technique because you and your organization will be stuck with it in perpetuity (or longer?).

All that you will need to do is all that an XA-compliant transaction manager does to coordinate a multi-resource manager UofW. Which means that you will be responsible for keeping track of each and every get and put, you will need to keep backup copies of each and every get and put. You will need to keep track of each according to the connection handle they were get/put under. Databases are great places to stick this kind of state data. You will need to drive the mqcmit/mqback process for each qmgr in turn; and, depending on the outcome, either mqcmit/mqback to get your business transaction back to a consistent state. I guess it sounds pretty easy when I can type it in under 500 words...

If your organizations primary function is writing system-level software, specifically transaction coodinators, then this may be a marketable item, or in a perverse way, fun. If, like most of the rest of us, you do IT as a requirement of some underlying business requirement (like payroll), redo your design to work within the specs of MQ.

Clearly, you need to get trained on MQ fundamentals. IBM has WM100 Technical Introduction to WebSphere MQ, a one-day class. WM50x WebSphere MQ Application Programming, 3-day class, includes hands-on labs on AIX, Solaris, z/OS. Visit www.ibm.com/training/us.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Wed May 06, 2009 1:03 pm    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

Bruce, are you saying that MCA is not going to solve my dilemma either?

While I appreciate the training link (it seems it has been changed to: http://www.ibm.com/products/finder/us/finders?pg=trfinder), unfortunately my company is not going to send me to training. We do not have the manuals so I have been reading the Redbook version and the publib on the ibm site.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 06, 2009 1:31 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

All the manuals are downloadable for free in .pdf format from www.ibm.com/mqseries.

MCA's do their work in UofWs - asynchronously from your application.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 06, 2009 3:07 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

...as to the link for ibm training i provided, take the dot off the end.

This link will take you to a place where you can download all mq manuals zipped into a single zip file http://www-01.ibm.com/software/integration/wmq/library/allbookspackage.html

It is unfortunate for all that IBM chose not to include titles. What were they thinking...
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Thu May 07, 2009 2:16 pm    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

Again many thanks!

While I have read the MQGET with respect to the the Syncpoint and Fail_If_Quiescing options I did not read the order of operations. Meaning by using Syncpoint does it allow me to get the message or do I still get the Failed completion code with either Q_Mgr_Quiescing or Connection_Quiescing reason when quiescing?

If I am able to get the message, can I also perform some business logic then Put the message do a Commit then allow quiescing?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next Page 3 of 4

MQSeries.net Forum Index » Multiphase Commit » 2PC?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.