Author |
Message
|
GaryGWood |
Posted: Wed Jun 02, 2004 7:39 am Post subject: Stopping a message flow while it's processing |
|
|
Apprentice
Joined: 14 Oct 2003 Posts: 48 Location: Austin, TX
|
I have message flows that return result sets from DB2 and then breaks each record into a message that is placed on a queue. Occassionally someone sends a job through that returns several hundred thousand rows to be converted to messages (they shouldn't but you know how it is ).
I would like to stop these flows during that processing since it can take quite a bit of time and then go back with the appropriate job request. How do I force MQSI to stop the processing? |
|
Back to top |
|
 |
Lisa |
Posted: Wed Jun 02, 2004 7:53 am Post subject: Stopping Flows |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
I assume that you would like to put the large result set on hold?
If this is the case, you can check the total records returned and if
it's greater than X, put the message to a temp queue or database and
re-process the message at a later time.
Hope this helps,
Lisa |
|
Back to top |
|
 |
GaryGWood |
Posted: Wed Jun 02, 2004 10:37 am Post subject: |
|
|
Apprentice
Joined: 14 Oct 2003 Posts: 48 Location: Austin, TX
|
Thanks Lisa, I would like to do that but unfortunately many of the applications doing this are not checking programmatically but rely on the end user to do the check, thus the occasional failure to catch this before processing starts. (we are updating applications as we can but it will take a while to get to them all)
Once the large result set starts processing, how can I stop it? |
|
Back to top |
|
 |
kirani |
Posted: Wed Jun 02, 2004 11:25 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Do you actually want to stop the message flow so that the input messages remain on the input queue? If so, you can use MQDisable node to disable the input queue, which is similar to stopping a message flow. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
GaryGWood |
Posted: Thu Jun 03, 2004 7:18 am Post subject: |
|
|
Apprentice
Joined: 14 Oct 2003 Posts: 48 Location: Austin, TX
|
No, I don't care about the input messages - it's usually only one and easily recreated. All I want is for the processing to stop. Disabling the input (by disabling the node as you suggest or inhibiting gets on the input queue) would prevent any new processing but won't stop what's currently being processed.
Are we simply at the message flow's mercy once it begins to run? |
|
Back to top |
|
 |
Lisa |
Posted: Thu Jun 03, 2004 7:32 am Post subject: Message Flow |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
Once the message flow starts to process the message, it appears that
you will need to determine (via code - ESQL) what to do with that message. You could put that message to a hold queue or discard it.
If you determine that the current message processing should stop, I believe the only way to end the processing would require killing the Execution group process (DataFlowEngine). This will end the process,
but the DataFlowEngine will restart and the message may or may not be lost. You will need to test this out.
Bottom line is, I do not believe that you can stop message processing in the middle of the flow.
Lisa |
|
Back to top |
|
 |
GaryGWood |
Posted: Thu Jun 03, 2004 8:07 am Post subject: |
|
|
Apprentice
Joined: 14 Oct 2003 Posts: 48 Location: Austin, TX
|
Lisa wrote: |
If you determine that the current message processing should stop, I believe the only way to end the processing would require killing the Execution group process (DataFlowEngine). |
Thanks Lisa! I have been told that killing the execution group process while it's processing can potentially corrupt the DB2 backend. Is this true? |
|
Back to top |
|
 |
morpheus |
Posted: Thu Jun 03, 2004 8:41 am Post subject: |
|
|
 Acolyte
Joined: 08 Mar 2003 Posts: 72 Location: Austin, TX
|
You can start and stop the message flow individually from the control center if you're using WMQI2.1. I don't know about WBI 5.0. There should be a way in that too. Messages will be left in the input queue once the message flow stopped.
-Morpheus |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 03, 2004 9:01 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
morpheus wrote: |
You can start and stop the message flow individually from the control center if you're using WMQI2.1. I don't know about WBI 5.0. There should be a way in that too. Messages will be left in the input queue once the message flow stopped. |
You can only stop a message flow if it is in a responsive state. If it is inside an ESQL loop, processing data, it likely will not be in a responsive state. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Lisa |
Posted: Thu Jun 03, 2004 10:00 am Post subject: Message Flow |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
I believe GaryGWood would like to stop processing the message while the message is being procssed by the message flow. Correct me if I'm wrong, but stopping the message flow after the message has been read will not stop the processing of said message.
GaryGWood: As per your DB2 corruption question. I've had to kill DataFlowEndgines that were in loops without any problems, but I would NOT use this method for your current problem. I still think you should use ESQL and put the message on hold.
Hope this helps,
Lisa |
|
Back to top |
|
 |
GaryGWood |
Posted: Thu Jun 03, 2004 11:44 am Post subject: |
|
|
Apprentice
Joined: 14 Oct 2003 Posts: 48 Location: Austin, TX
|
Yes, the flow is unresponsive so I cannot stop it from the control center - the request to stop will time out.
Lisa has it exactly right as to what I would like to do. We are working torward the suggested fix but that will take some time to get all the applications updated. Meanwhile, it appears that killing the DataFlowEngine is my only option.  |
|
Back to top |
|
 |
kirani |
Posted: Thu Jun 03, 2004 12:32 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Alternatively, you can add some ESQL code in your message flow to identify problem messages, these messages can then be routed to different path within your message flow where you will ignore/discard them and use MQDisable node to disable the input queue.
Killing Dataflowengine is not a good solution as the message will backout the the input queue. Depending on your message flow design and queue configuration the same message might get processed once again. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|