Author |
Message
|
brgmo |
Posted: Tue Jun 03, 2008 12:54 am Post subject: Termintaing a floe |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
Hi All,
Any ideas how can i termintae a message flow. The requirement is for certain numbers of the incoming messages,we have to process but as soon as the control message arrives we have to terminate the flow at the compute node so that there is no passage of the message to the next mqoutput node.
Regards
brgmo |
|
Back to top |
|
 |
Gemz |
Posted: Tue Jun 03, 2008 1:14 am Post subject: |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Check the condition to where to terminate the flow. Then use 'Return false' to terminate the flow.
Quote: |
For Eg:
IF (Condition)
RETURN FALSE; --This will terminate the flow.
END IF; |
|
|
Back to top |
|
 |
bisu |
Posted: Tue Jun 03, 2008 2:02 am Post subject: |
|
|
 Apprentice
Joined: 05 Jan 2005 Posts: 25 Location: India
|
Do agree with Gemz also want to add one more point, I think you should not use more than one instance of the flow, in that case the requirement might not be achieved....
Cheers  |
|
Back to top |
|
 |
Gemz |
Posted: Tue Jun 03, 2008 2:06 am Post subject: |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Bisu,
If we hav more than one instance, Will one instance affect the another one? |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Jun 03, 2008 2:22 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
If all you want is that a particular message should not be propagated further then do as Gemz has suggested...
Return False ll stop the message then and there itself...
HOWEVER, if you want to stop the msgflow(deployed on exec grp) so that it does not process any further message then you need to look at a wider picture... _________________ Cheers |
|
Back to top |
|
 |
bisu |
Posted: Tue Jun 03, 2008 2:43 am Post subject: |
|
|
 Apprentice
Joined: 05 Jan 2005 Posts: 25 Location: India
|
Hi Gemz... as far as message processing is concerned, one instance doesn't impact the processing of the other one, but so far I understood the scenario is somewhat dependent upon the message processing sequence. Say one instance is executing the control message and the other one is executing a message arrived after the control message, which should not be processed to next compute node. Now if the second instance finishes the execution prior to the processing of the first instance, then the requirement is not achived. That's why I think using more than one instance might not provide the exact requirement. Please let us know your view on this.  |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 03, 2008 3:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Looking at it from a message flow point of view stopping the propagation of the message is the wrong thing to do as this would need to CHANGE the flow.
The right thing to look at would be to stop the flow. In flight instances of the flow will still run and end normally. No new flow should be started. I don't know that there is a gracefull way to rollback in flight flows. You might want to kill the eg. but you need to be sure to verify the effect on all flows in flight within the execution group and this is sure not something for a production environment. You need to let in flight flows finish.
This will then allow to look at what is accumulating in the input queue.
As I understand the requirement you would need to run a single instance of the flow. You need to make sure the messages are in the right order on the queue (no guarantees) and then issue from the flow the stop command to the flow (using the java api?) while processing the stop message.
Well have lots of fun
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|