Start Channel (MQTT)
The Start Channel (MQCMD_START_CHANNEL) command starts an IBM MQ channel. This command can be issued to a channel of type MQCHT_MQTT.
Required parameters
- ChannelName (MQCFST)
- Channel name (parameter identifier: MQCACH_CHANNEL_NAME).
The name of the channel to be started. The maximum length of the string is MQ_CHANNEL_NAME_LENGTH.
This parameter is required for all channel types including MQTT channels.
- ChannelType (MQCFIN)
- The type of channel (parameter identifier: MQIACH_CHANNEL_TYPE). This parameter is currently only used with MQTT Telemetry channels, and is required when starting a Telemetry channel. The only value that can currently be given to the parameter is MQCHT_MQTT.
Error codes
This command might return the following error codes in the response format header, in addition to the values shown in Error codes applicable to all commands.
- Reason (MQLONG)
- The value can be any of the following values:
- MQRCCF_PARM_SYNTAX_ERROR
- The parameter specified contained a syntax error.
- MQRCCF_PARM_MISSING
- Parameters are missing.
- MQRCCF_CHANNEL_NOT_FOUND
- The channel specified does not exist.
- MQRCCF_CHANNEL_IN_USE
- The command did not specify a parameter or parameter value that was required.
- MQRCCF_NO_STORAGE
- Insufficient storage is available.
- MQRCCF_COMMAND_FAILED
- The command has failed.
- MQRCCF_PORT_IN_USE
- The port is in use.
- MQRCCF_BIND_FAILED
- The bind to a remote system during session negotiation has failed.
- MQRCCF_SOCKET_ERROR
- Socket error has occurred.
- MQRCCF_HOST_NOT_AVAILABLE
- An attempt to allocate a conversation to a remote system was unsuccessful. The error might be transitory, and the allocate might succeed later. This reason can occur if the listening program at the remote system is not running.