|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Environment persistence question |
« View previous topic :: View next topic » |
Author |
Message
|
mattfarney |
Posted: Wed Mar 16, 2011 2:51 pm Post subject: Environment persistence question |
|
|
 Disciple
Joined: 17 Jan 2006 Posts: 167 Location: Ohio
|
Broker 7.0
Assume I have a messageFlow node that has two connected nodes (A and B) both from the Out handle.
The documentation is not clear how this is going to be handled. I'm clear that the order is undetermined - either path could be first. I want to know if the messages are completely separate at this point? That is, does each have a complete and separate tree of data?
The documentation had a discussion similar to this when talking about FlowOrder node (which would allow specifying A then B processing). The description in the manual was specific about how this affected the data tree but didn't explain how it would work w/o the Flow Order node.
Let me make this into a question.
I have two compute nodes connected directly to the MQInput of a message flow. Each compute node copies the message and then sets Environment.Variables.MyName='A' for Node A. (Similarly 'B' for Node B).
So, let's say that the flow goes Node A then Node B.
At the start of Node B, what is the value of Environment.Variables.MyName? A, NULL, or non-existent?
-mf |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 16, 2011 3:04 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Everything the documentation says about how the FlowOrder node works applies here, except for the explicit ordering that FlowOrder provides.
Suppose you go down path A for a while, and you make multiple transformations to the message assembly. At some point down that path, you then do the equivalent of the ESQL RETURN FALSE; in which you end processing.
At this point in time, control returns back up to the chain of nodes to the next node that has not completed processing. Ideally, this is the same node that has multiple paths from the Out node - but it could be further downstream on Path A from that.
Let's pretend that it does go all the way back.
At that point in time, the message assembly is the same as what had been passed down Path A at the start.
However, the Environment tree is atomic. So in all cases, the pointer to it from assembly points to what amounts to the same location within the instance of the flow.
So when you make changes to Environment, they are available to every instance of the assembly at that point in time.
If, for example, one had somehow managed to run both Path A and Path B in true parallel (not possible in current releases), then you could run into race conditions or other thread conflicts.
So you should find from experimentation that Environment.Variables.MyName will be A at the start of Path B.
Experimentation is highly encouraged. |
|
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
|
|
|
|