Author |
Message
|
mbwannabe1 |
Posted: Thu Aug 02, 2012 12:43 pm Post subject: backout and exceptionlist behavior in MqOutout-->MQGet--& |
|
|
Novice
Joined: 18 Apr 2012 Posts: 13
|
I have a scenario where we have a state queue that gets written to from an MQOutput Node. I want to read from the queue using an MQGet node and then do some processing in a compute node. if for some reason the processing in the compute node fails, then I want to back out the message to the queue it did the mqget from and not further back down the flow. Would i be able to accomplish this by setting transactionality to No on the MQOutput and MQGet Nodes (even if the queue is persistent). Also, dont want the exceptionlist to be overwritten with a new exceptionlist if compute node processing fails. How do i accomplish this, by connecting the catch terminal back to the MQOutput node? I did go through some of the earlier posts and infocenter but the answer was not immediately clear to me... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Aug 02, 2012 12:50 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mbwannabe1 |
Posted: Fri Aug 03, 2012 10:01 am Post subject: |
|
|
Novice
Joined: 18 Apr 2012 Posts: 13
|
I did that and now have
Quote: |
MQOutput-->Try Catch--MQGET-->Compute |
However, If I simulate a failure in the Compute Node, I dont see the message backing out to the MQOutput node but instead being discarded.
My Advanced properties on the MQGet Node are
Transaction Mode : No
Generate Mode : Message
Copy Message : Copy Etire Message
Should these be set differently - Transaction Mode : yes on MQGet Node but 'No' on MqOutput node to prevent it backing out further down the flow towards the mqinput node ...? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 03, 2012 10:33 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mbwannabe1 |
Posted: Fri Aug 03, 2012 10:43 am Post subject: |
|
|
Novice
Joined: 18 Apr 2012 Posts: 13
|
I am getting there . Your point on the class is well taken. I inserted a filter node to check for Backout Count and propogating to MQGet Node only if BackoutCount=0. However, I want to use an environment variable instead of using the MQMD.backout Count, so that i can just stop and start the message flow to resume processing when the error condition is cleared. How do i set an env variable in the compute node in case of Exception? kinda like checking for $# at the unix level... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 03, 2012 10:46 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mbwannabe1 wrote: |
I am getting there . Your point on the class is well taken. I inserted a filter node to check for Backout Count and propogating to MQGet Node only if BackoutCount=0. However, I want to use an environment variable instead of using the MQMD.backout Count, so that i can just stop and start the message flow to resume processing. How do i set an env variable in the compute node in case of Exception? kinda like checking for $# at the unix level... |
Again, this topic is covered in the InfoCentre and in the class. Would be pointless for me to tell you how, because it just gets you to the next level of information which you don't know.
What your trying to do is very common technique and taught in the class. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mbwannabe1 |
Posted: Fri Aug 03, 2012 12:03 pm Post subject: |
|
|
Novice
Joined: 18 Apr 2012 Posts: 13
|
yup, the infocenter is where I have been researching this from. So far, here is the algorithm I have come up with :
- Error in compute node sets shared schema level env variable and exception is manually thrown
- Filter Node after MQGet Node checks from Env Error Variable and
dosent propogate forward if the variable is set.
- When error/issue is corrected, flow is restarted to resume normal
processing
so flow looks like MQOutput->TryCatch->MQGet->Filter->Compute
any steps/logic i might be missing? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 03, 2012 12:10 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
|