See information about the latest product version
mqsistartmsgflow command
Use the mqsistartmsgflow command to start execution groups, applications, and message flows.
Supported operating systems
- Windows
- Linux and UNIX systems
- z/OS®. Run this command by customizing and submitting BIPSTMF; see Contents of the broker PDSE
Purpose
- To start a specific message flow in an execution group
- To start all message flows in the execution group
- To start a specific execution group
- To start all execution groups
- To start a message flow in a specific application or library or both
- To start all message flows in a specific application or library or both
- To start a specific application
- To start all applications
To use this command, you must have already deployed message flows, if specified, to the broker in a broker archive (BAR) file. You can start message flows only if the execution group to which the message flow is deployed is running.
Syntax
>>-mqsistartmsgflow--| brokerSpec |-----------------------------> >--+- -e --executionGroupName-+--+--------------+---------------> '- -g ---------------------' +- -m flowName-+ '- -j ---------' >--+---------------------+--+---------------------+-------------> +- -k applicationName-+ '- -v --traceFileName-' '- -z ----------------' >--+-------------------+--+-------------------+---------------->< '- -w --timeoutSecs-' '- -y --libraryName-' brokerSpec |--+- brokerName ----------------+------------------------------| +- -n --brokerFileName--------+ | .-------------------------. | | V | | '-----+- -i --ipAddress-+---+-' +- -p --port------+ '- -q --qMgr------'
Parameters
- brokerSpec
- (Required) You must specify at least one parameter
to identify the target broker for this command, in one of the following
forms:
- brokerName
- This parameter identifies the name of a locally defined broker. You cannot use this option if the broker is on a remote computer.
- -n brokerFileName
- This parameter identifies the name of a file that contains the
connection details for a local or remote broker.
Use this option if multiple users want to connect to the same broker, or if you are using advanced connection parameters such as SSL.
To create this file, right-click the broker in the WebSphere® Message Broker Explorer and select Export *.broker file. When prompted, navigate to the location in which you want to save the file and enter the file name; the extension .broker is appended automatically when you click Save. 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.
If you want to run a command that uses SSL to administer a remote broker over a secured channel, you must specify the keystore and truststore password for the connection using the IBM_JAVA_OPTIONS environment variable. See Resolving problems when running commands for further information.
- -i ipAddress, -p port, -q qMgr
- These parameters identify the connection details for the broker.
Use this option for connections to remote brokers that do not require advanced connection parameters.
If you choose this option, you must specify at least one of these three parameters; the order in which you specify them is insignificant. You cannot specify each parameter more than once.
Parameters that you omit assume default values:
- -i ipAddress: The host name or the IP address of the computer on which the broker is running. If you do not specify this parameter, a value that represents the local computer is used.
- -p port: The TCP port on which the broker's queue manager is listening. If you do not specify this parameter, the value 1414 is used.
- -q qMgr: The name of the broker's queue manager. If you do not specify this parameter, a value that represents the default queue manager on the local computer is used.
- You cannot connect to a remote queue manager on z/OS; see Usage note.
- -e executionGroupName
- (Optional) The name of the execution group for which
to start message flows. You must specify either -e or -g.
If you specify -e without -m or -j, the execution group is started. Message flows are started only if they were running when the execution group was stopped.
If you specify -e with -m or -j, the execution group must be running. If the execution group is stopped, the request is rejected.
- -g
- (Optional) The specified message flow or flows are
started on all execution groups on the specified broker. You must
specify either -e or -g.
If you specify -g without -m or -j, all execution groups are started, but message flows are started only if they were running when the execution group was stopped.
If you specify -g with -m or -j, the specified message flow or flows are started only if the execution group is running. The request checks all execution groups, and starts message flows on execution groups that are currently running. Error BIP2851 is reported for each execution group that is not running.
- -j
(Optional) All message flows in the specified execution group are started.
If you set this parameter, all message flows in the execution group are started, regardless of whether they are at the execution group level, in an application, or in a library. No applications are started. If you set the -j parameter with the -z parameter, all applications in the execution group are started, and the message flows that are at the execution group level or in libraries at the execution group level are started. The combination of -j and -z parameters does not start message flows inside applications, or message flows inside libraries inside applications.
If you do not specify -j or -m, the execution group identified by -e (if specified), or all execution groups on this broker, are started. Message flows that were running when the execution group was last stopped are also restarted.
- -k applicationName
- (Optional) The name of an application to which to target a start
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 started. If you set the –m parameter, the named message flow in the application is started.
If you set the –j parameter with the -k parameter, all message flows in the application are started, including those in referenced libraries. Message flows in other applications or at execution group level are not started. The application is not started.
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 start message flows in an application that is not started.
You cannot set both the –k parameter and the –z parameter.
- -m flowName
- (Optional) The name of the message flow being started.
- If you do not specify -m or -j, the execution group identified by -e (if specified), or all execution groups on this broker, are started. Message flows that were running when the execution group was last stopped are also restarted.
- -v traceFileName
- (Optional) This parameter sends internal debug trace information 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 start 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 started.
If you set the –j parameter with the –y parameter, all message flows in the library are started. Message flows in other libraries or at execution group level are not started.
To start 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 flows in the named library in the named application are started. No flows are started at the application level, or in any other libraries in the application. No flows are started in any other application or at execution group level. The application is not started.
- -z
- (Optional) The -z parameter indicates that
all applications in an execution group are to be started.
If you set the -j parameter with the -z parameter, all applications in the execution group are started, and the message flows that are at the execution group level or in libraries at the execution group level are started. The combination of -j and -z parameters does not start message flows inside applications, or message flows inside libraries inside applications.
Usage note
If you try to connect to a remote broker by specifying the i, p, and q parameters, or by using a connection parameter file (.broker), the command attempts to use WebSphere MQ Java™ client code. This option is not supported on z/OS, and returns the following error:
BIP1046E: Unable to connect with the broker (name)
The reported reason code is MQRC_ENVIRONMENT_ERROR. You must specify a local queue manager.
Authorization
- Security requirements for Linux and UNIX platforms
- Security requirements for Windows systems
- Security requirements for z/OS
Responses
- 0
- The command completed successfully.
- 2
- (Failure) The broker received the deployment request but was unable to process it successfully. See the messages issued from the utility (or the Administration log) for more information.
- 9
- (Failure) The request has been submitted to the broker, but no response was received before the timeout expired.
- 10
- (Failure) Another user or application canceled the request operation before the broker was able to process it.
- 98
- The broker is not running.
- 99
- One or more of the parameters that you specified is invalid.
Examples
Start a named message flow that you have deployed to execution group eg1 on the broker MB8BROKER:
mqsistartmsgflow MB8BROKER -e eg1 -m simpleflow
Ensure that all message flows are running on the local broker MB8BROKER:
mqsistartmsgflow MB8BROKER -g -j
Start the message flow myFlow1 in the application myApplication in the default execution group:
mqsistartmsgflow MB8BROKER -e default -k myApplication -m myFlow1
Start the message flow myFlow1 in the library myLibrary, which is referenced by the application myApplication, in the default execution group:
mqsistartmsgflow MB8BROKER -e default -k myApplication -y myLibrary -m myFlow1
Start all message flows and start all applications in the default execution group:
mqsistartmsgflow MB8BROKER -e default -z -j