Purge Channel

The Purge Channel (MQCMD_PURGE_CHANNEL) command stops and purges an IBM MQ telemetry channel.

This command can only be issued to an MQTT channel type.

Purging a telemetry channel disconnects all the MQTT clients connect to it, cleans up the state of the MQTT clients, and stops the telemetry channel. Cleaning the state of a client deletes all the pending publications and removes all the subscriptions from the client.


Required parameters

    ChannelName (MQCFST)
    Channel name (parameter identifier: MQCACH_CHANNEL_NAME).

    The name of the channel to be stopped and purged. The maximum length of the string is MQ_CHANNEL_NAME_LENGTH.

    ChannelType (MQCFIN)
    Channel type. This parameter must follow immediately after the ChannelName parameter, and the value must be MQTT.


Optional parameters

    ClientIdentifier (MQCFST)
    Client identifier. The client identifier is a 23-byte string that identifies an MQ Telemetry Transport client. When the Purge Channel command specifies a ClientIdentifier, only the connection for the specified client identifier is purged. If the ClientIdentifier is not specified, all the connections on the channel are purged.

    The maximum length of the string is MQ_CLIENT_ID_LENGTH.