|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem while using PROPAGATE statement |
« View previous topic :: View next topic » |
Author |
Message
|
radhika.tharayil |
Posted: Fri Mar 29, 2013 3:08 am Post subject: Problem while using PROPAGATE statement |
|
|
Newbie
Joined: 06 Apr 2010 Posts: 7
|
I am having a provider flow, which has a MQInput node followed by compute and the some downstream nodes.
I am using the compute node to send requests to multiple destinations one at a time. For which I am using the PROPAGATE statement. Below the code snippet.
DECLARE countDBResult INTEGER COALESCE(CARDINALITY(InputRoot.MQRFH2.usr.SOAP[]),0);
DECLARE j INTEGER 1;
WHILE j<=countDBResult DO
Some logic……………
PROPAGATE TO TERMINAL 'out' DELETE NONE;
SET j = j + 1;
END WHILE;
RETURN FALSE;
The problem I face is if the countDBResult is 2 for e.g. Propagate will output two different messages out of compute node. But during this the original message is getting stored in the MQInput node input queue, and when the count of j reaches 3, the message flow restarts again by picking the message from the input queue and process it further 2 times. Hence if the countDBResult was 2, I get 4 outputs 2 for every iteration for a typical failure scenario where both the endpoints are down. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 29, 2013 3:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Don't use CARDINALITY to write loops. It's bad.
Use reference variables or use the for loop that uses reference variables.
Nothing you have shown would cause the behavior you are asking about.
A failure in the flow somewhere, likely after the propagate loop has finished, that causes the message to roll back and retry, would cause the behavior you are asking about. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Mar 29, 2013 4:11 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
You may like to set Transactionality to OFF. You may like to have a formal error handler. You may like to have a backout queue. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
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
|
|
|
|