Use the mqsistopmsgflow command to stop integration servers, applications, and message flows.
To use this command, you must have already deployed message flows, if specified, to the integration node in a BAR file.
The integration node processes all inflight messages and associated transactions for each message flow before the integration node stops. For information about how outstanding units of work are handled in this situation, see Message flow transactions.
>>-mqsistopmsgflow--| integrationNodeSpec |---------------------> >--+- -e --integrationServerName-+------------------------------> '- -g ------------------------' >--+-----------------------------+--+--------------+------------> '- -f --restartExecutionGroup-' +- -m flowName-+ '- -j ---------' >--+---------------------+--+---------------------+-------------> +- -k applicationName-+ '- -v --traceFileName-' '- -z ----------------' >--+-------------------+--+-------------------+---------------->< '- -w --timeoutSecs-' '- -y --libraryName-' integrationNodeSpec |--+- integrationNodeName ---------+----------------------------| +- -n --integrationNodeFileName-+ +- -i --ipAddress-- -p --port---+ '-+- -i --ipAddress-+-----------' '- -p --port------'
Use this option if multiple users want to connect to the same integration node, or if you are using advanced connection parameters such as SSL. To learn more about creating and using a .broker file, see Connecting to an integration node by creating a .broker file.
If you want to run a command that uses SSL to administer a remote integration node over a secured channel, you must specify the keystore and truststore password for the connection that is using the IBM_JAVA_OPTIONS environment variable. For more information, see Resolving problems when running commands.
Use this option for connections to remote integration nodes that do not require advanced connection parameters.
If you are connecting to a remote integration node, you can additionally prefix integrationNodeName to explicitly set which integration node to connect to. You cannot use -n integrationNodeFileName in the same command.
Parameters that you omit assume default values:
If you want to connect to a secured integration server as a specific user, provide the security credentials as a URI in the following format: tcp://user:password@hostname. If your password contains URI Reserved characters, you must convert these characters to the percent-encoded format. For more information, see A correct URL and password returns error BIP1939 when you attempt to connect to a remote host name in Resolving problems when running commands.
If you specify -e without -m or -j, the integration server is stopped. The state of every message flow (stopped or started) is retained, and started message flows are started when the integration server is started again.
If you specify -e with -m or -j, the integration server must be running. If the integration server is stopped, the request is rejected.
(Optional) Used with the -m, -e, and -k parameters to force the named message flow to stop within the named integration server or the named application.
The -f parameter specifies how the named message flow is stopped. Currently, restartExecutionGroup is the only option that can be specified, which causes the named message flow to be flagged as stopped and then restarts the named integration server. When the integration server restarts, the message flow is in the stop state.
If you specify -g without -m or -j, all integration servers are stopped. The state of every message flow (stopped or started) is retained for each integration server, and started message flows are started when the integration server is started again.
If you specify -g with -m or -j, the specified message flow or flows are stopped only if the integration server is running. The request checks all integration servers, and stops message flows on integration servers that are currently running. Error BIP2851 is reported for each integration server that is not running.
(Optional) All message flows in the specified integration server are stopped; the integration server is not stopped.
If you set this parameter, all message flows in the integration server are stopped, regardless of whether they are at the integration server level, in an application, or in a library. No applications are stopped. If you set the -j parameter with the -z parameter, all applications in the integration server are stopped, and the message flows that are at the integration server level or in libraries at the integration server level are stopped. The combination of -j and -z parameters does not stop message flows inside applications, or message flows inside libraries inside applications.
If you do not specify -j or -m, the integration server that is identified by -e (if specified), or all integration servers on this integration node, are stopped.
If you set the -k parameter, you must also set the -e parameter. If you set the -k parameter but do not set the -m parameter, the application is stopped. When an application is stopped, the message flows that it contains do not run. If you set the -m parameter, the named message flow in the application is stopped.
If you set the -j parameter with the -k parameter, all message flows in the specified application are stopped, including the message flows in referenced libraries. Message flows in other applications or at integration server level are not stopped. The application is not stopped.
If you set the -k parameter with the -m or -j parameters, ensure that the application that is specified by the -k parameter is running. You cannot stop message flows in an application that is not started.
You cannot set both the -k parameter and the -z parameter.
You can specify only one message flow in a single command. If you want to stop all message flows deployed to the integration node, or to the integration server identified by -e, specify -j.
If you set the -y parameter, you must also set the -e parameter. If you set the -m parameter, the named message flow in the library is stopped.
If you set the -j parameter with the -y parameter, all message flows in the specified library are stopped. Message flows in other libraries or at integration server level are not stopped.
To stop all flows in a specific library in an application, use the -y parameter with the -k parameter. When you use a combination of the -y and -k parameters, only the flows in the named library in the named application are stopped. No flows are stopped at the application level, or in any other libraries in the application. No flows are stopped in any other application or at integration server level. The application is not stopped.
If you set the -j parameter with the -z parameter, all applications in the integration server are stopped, and the message flows that are at the integration server level or in libraries at the integration server level are stopped. The combination of -j and -z parameters does not stop message flows inside applications, or message flows inside libraries inside applications.
In previous versions of IBM® Integration Bus, you might have used the -q parameter for this command to define a connection to a queue manager. A queue manager connection is no longer used to connect to an integration node. The -q parameter is now deprecated, and is ignored if used. If you use the -q parameter, a BIP1922 warning is displayed.
mqsistopmsgflow IBNODE -e eg2
mqsistopmsgflow IBNODE -g
Stop the message flow myFlow1 in the application myApplication in the default integration server:
mqsistopmsgflow IBNODE -e default -k myApplication -m myFlow1
Stop the message flow myFlow1 in the default integration server and restart the default integration server:
mqsistopmsgflow IBNODE -e default -m myFlow1 -f restartExecutionGroup
Stop the message flow myFlow1 in the library myLibrary, which is referenced by the application myApplication, in the default integration server:
mqsistopmsgflow IBNODE -e default -k myApplication -y myLibrary -m myFlow1
Stop all message flows and stop all applications in the default integration server:
mqsistopmsgflow IBNODE -e default -z -j