mqsistopmsgflow command

Use the mqsistopmsgflow command to stop integration servers, applications, and message flows.

Purpose

You can use the mqsistopmsgflow command for the following purposes:
  • To stop a specific integration server.
  • To stop all integration servers.
  • To stop a specific application in an integration server.
  • To stop all applications on one or all integration servers.
  • To stop a message flow in a specific application or library or both.
  • To stop all message flows in all applications.
  • To stop all message flows in all applications in all integration servers.

To use this command, you must deploy 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 more information about how outstanding units of work are handled in this situation, see Message flow transactions.

Syntax for use with integration nodes

Read syntax diagramSkip visual syntax diagram mqsistopmsgflow integrationNodeName-n integrationNodeFileName -i ipAddress -p port -e integrationServerName --all-integration-servers  -k  applicationName --all-applications  -y libraryName -m  flowName --all-flows  -w timeoutSecs --detail-level level --trace traceFileName

Syntax for use with independent integration servers

Read syntax diagramSkip visual syntax diagram mqsistopmsgflow  -i ipAddress -p  port -k  applicationName --all-applications  -y libraryName -m  flowName --all-flows  -w timeoutSecs --detail-level level --trace traceFileName

Parameters

integrationNodeName
This parameter identifies the name of a specific integration node. To connect to a remote integration node by name, you must also specify -i and (optionally) -p.
-n integrationNodeFileName | --integration-node-file integrationNodeFileName
This parameter identifies the name of a .broker file that contains the connection details for an integration node or independent integration server. Include the location (path) and file name when you specify this parameter. You must ensure that the location is accessible when you run this command.

The file can be used to connect to an independent integration server. The connection details must not include a node name (integrationNodeName) and the host and port must be for an independent integration server.

Use this option if multiple users want to connect to the same integration node or integration server, or if you are using advanced connection parameters such as SSL. To learn more about how to create and use a .broker file, see Connecting to an integration node by creating a .broker file.

You can run a command that uses SSL to administer a remote integration node or integration server 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.

-i ipAddress, -p port | --admin-host ipAddress, --admin-port port
These parameters identify a host and port for an integration node or independent integration server, for connections that do not require advanced connection parameters.

To connect to a specific remote integration node by name, you can add the prefix integrationNodeName. You cannot use -n integrationNodeFileName in the same command.

For an integration node, any parameters that you omit assume default values.

  • -i ipAddress. The hostname or IP address of the computer on which the integration node or server is running. If you do not specify this parameter, a value that represents the local computer is used.

    To connect to an independent integration server, the value is the host that you specified in the adminRestApiHost property in the server.conf.yaml configuration file for the integration server.

    If you want to connect to a secured integration node or 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.

  • -p port. The port on which the web user interface HTTP connection listener is listening. If you do not specify this parameter, the value 4414 is used.

    To connect to an independent integration server, the value is the port that you set for the adminRestApiPort property in the server.conf.yaml configuration file. By default adminRestApiPort is set to 7600.

Other parameters:

-e integrationServerName
(Optional) You can use the -e parameter if you specify an integration node and you want to stop message flows on a specified integration server on the specified integration node.

(If you do not specify an integration node, you can use -i ipAddress, -p port | --admin-host ipAddress, --admin-port port to specify an independent integration server).

If you specify -e without -m or --all-flows, 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 --all-flows, the integration server must be running. If the integration server is stopped, the request is rejected.

--all-integration-servers
(Optional) You can use the --all-integration-servers parameter if you specify an integration node and you want to stop message flows on all integration servers on the specified integration node.

If you specify --all-integration-servers without -m or --all-integrations-servers, 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 --all-integration-servers with -m or --all-flows, 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.

--all-flows

(Optional) All message flows in the specified applications are stopped.

-k applicationName
(Optional) The name of an application to which to target a stop request.

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 --all-flows 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 --all-flows 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 --all-applications parameter.

-m flowName
(Optional) The name of the message flow that is being stopped. You can specify this parameter when you run the command against an integration node, or an independent integration server.

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, or to an independent integration server, specify --all-flows.

If you run the command against an integration node, and you do not specify -m or --all-flows, the integration server that is identified by -e (if specified), or all integration servers on this integration node, are stopped.
--detail-level
This parameter controls the detail level of response messages.
  • 0 = display summary information
  • 1 = display standard information (default)
  • 2 = display detailed information
-v traceFileName
(Optional) This parameter sends internal debug trace information about a command to the specified file.
-w timeoutSecs
(Optional) This parameter specifies the time in seconds that the utility waits to ensure that the command completed; the default value is 60.
-y libraryName
(Optional) The name of a library to which to target a stop request.

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 --all-flows 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.

--all-applications
(Optional) The --all-applications parameter indicates that all applications in an integration server are to be stopped.

Deprecation of the -q parameter

In previous versions of IBM App Connect Enterprise, the -q parameter for this command was available 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.

Removal of -f parameter

In IBM Integration Bus version 10 and earlier, the mqsistopmsgflow command had a -f parameter. The -f parameter was a force mode that stopped the message flow by restarting the integration server and putting the message flow into stopped state. In IBM App Connect Enterprise version 11, the -f parameter is not available in the mqsistopmsgflow command. The same function is now available by using the mqsireload command. For more information, see mqsireload command. If you use the -f parameter with the mqsistopmsgflow command, a BIP8932E error is displayed.

Examples

Stop a named integration server on integration node INODE:
mqsistopmsgflow INODE -e eg2
Stop all integration server processes on the local integration node INODE:
mqsistopmsgflow INODE --all-integration-servers

Stop the message flow myFlow1 in the application myApplication in the default integration server:

mqsistopmsgflow INODE -e default -k myApplication -m myFlow1

Stop the message flow myFlow1 in the library myLibrary, which is referenced by the application myApplication, in the default integration server:

mqsistopmsgflow INODE -e default -k myApplication -y myLibrary -m myFlow1

Stop all message flows in all applications in the default integration server:

mqsistopmsgflow INODE -e default --all-applications --all-flows

Stop all message flows, including those running in static libraries within the application myApplication:

mqsistopmsgflow INODE -e default --application myApplication --all-flows

Stop the message flow myFlow1 in the application myApplication in an independent integration server:

mqsistopmsgflow --admin-host localhost --admin-port 7600 -k myApplication -m myFlow1