|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Propagate not rolling back |
« View previous topic :: View next topic » |
Author |
Message
|
WMB_Apprentice |
Posted: Mon Sep 01, 2014 2:07 pm Post subject: Propagate not rolling back |
|
|
Newbie
Joined: 01 Sep 2014 Posts: 3
|
Hi Mentors/Experts,
Below is the flow, In compute node I am splitting the request into multiple output and propagate each to MQ output node, when 2 propagate have happened successfully and fails for 3rd propagate, I can see 2 message in the output queue and 1 message in the Error Queue.
Expectation: Message should be only in Error queue the earlier propagated messages on the output queue should be rolled back
I saw couple of threads in this forum regarding the above without a succesful solution, not sure if there is any alternative approach to it.
Throw
|
MQInput Try Catch --> Try Compute Node MQ Output Node
|
Catch ErrorHandler Subflow writes to Error Queue
Code:-
Code: |
BEGIN
CALL CopyEntireMessage();
RETURN FALSE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
DECLARE refTest REFERENCE TO InputRoot.XMLNSC.Record.Data[1];
WHILE LASTMOVE(refTest) DO
IF refTest.No ='3' THEN
THROW USER EXCEPTION MESSAGE 2951 VALUES ('Propagation Failure');
ELSE
SET OutputRoot.XMLNSC.Record.Data = refTest;
PROPAGATE TO TERMINAL 'out';
END IF;
MOVE refTest NEXTSIBLING;
END WHILE;
END; |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Sep 01, 2014 4:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bad form. Please don't change the autogenerated copyEntireMessage procedure. Create your own. (Less confusion this way)
And if you want it to behave the way you said you need to raise an exception on the catch path and handle the message on the failure path...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
WMB_Apprentice |
Posted: Tue Sep 02, 2014 10:05 am Post subject: |
|
|
Newbie
Joined: 01 Sep 2014 Posts: 3
|
Hi Fjb_Saber,
Appreciate your response, the below suggestion works fine for one case that is Schema Validation/User Exception
And if you want it to behave the way you said you need to raise an exception on the catch path and handle the message on the failure path...
I have modified the flow as below,
Failure --> ErrorHandler Subflow --> writes to Error Queue
|
MQInput --> Compute Node --> MQ Output Node
|
Catch --> ErrorHandler Subflow --> writes to Error Queue
since the original exception list is modified how to distinguish between Schema Validation/User Exception and MessageException(like put failed)
in the failure terminal
I want the message exception to be sent to the backout queue(BO Threhold =3) not the error queue.
Yours Apprentice. |
|
Back to top |
|
 |
WMB_Apprentice |
Posted: Fri Sep 12, 2014 10:16 am Post subject: |
|
|
Newbie
Joined: 01 Sep 2014 Posts: 3
|
Hi Fjb_Saber,
Many thanks, I was able to find a solution to the below by using shared variables.
If Failure Node of the MQInput queue was used then already propagated messages to the MQ output queue were rolled back, I even tried Error handling in the compute node failure terminal but that did not work, any idea why? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 12, 2014 1:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The catch branch operates in the same transaction.
The failure branch operates in a different transaction...  _________________ 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
|
|
|
|