Inquire Channel (MQTT)

The Inquire Channel (MQCMD_INQUIRE_CHANNEL) command inquires about the attributes of IBM MQ channel definitions.


Required parameters

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

    Generic channel names are supported. A generic name is a character string followed by an asterisk (*), for example ABC*, and it selects all channels having names that start with the selected character string. An asterisk on its own matches all possible names.

    The maximum length of the string is MQ_CHANNEL_NAME_LENGTH.

    ChannelType (MQCFIN)
    Channel type (parameter identifier: MQIACH_CHANNEL_TYPE).

    If this parameter is present, eligible channels are limited to the specified type. Any attribute selector specified in the ChannelAttrs list which is only valid for channels of a different type or types is ignored; no error is raised.

    If this parameter is not present (or if MQCHT_ALL is specified), channels of all types are eligible. Each attribute specified must be a valid channel attribute selector (that is, it must be one from the following list), but it might not be applicable to all (or any) of the channels returned. Channel attribute selectors that are valid but not applicable to the channel are ignored, no error messages occur, and no attribute is returned.

    The value must be:

      MQCHT_MQTT
      Telemetry channel.


Optional parameters

    ChannelAttrs (MQCFIL)
    Channel attributes (parameter identifier: MQIACF_CHANNEL_ATTRS). The attribute list can specify the following value on its own - default value used if the parameter is not specified:

      MQIACF_ALL
      All attributes.

    or a combination of the following parameters:

    MQCA_SSL_KEY_REPOSITORY
    TLS Key Repository

    MQCACH_CHANNEL_NAME
    Channel name. We cannot use this attribute as a filter keyword.

    MQCACH_JAAS_CONFIG
    The file path of the JAAS configuration

    MQCACH_LOCAL_ADDRESS
    Local communications address for the channel

    MQCACH_MCA_USER_ID
    MCA user identifier.

    MQCACH_SSL_CIPHER_SPEC
    TLS cipher spec.

    MQCACH_SSL_KEY_PASSPHRASE
    TLS key passphrase.

    MQIACH_BACKLOG
    The number of concurrent connection requests that the channel supports.

    MQIACH_CHANNEL_TYPE
    Channel type

    MQIACH_PORT
    Port number to use when TransportType is set to TCP.

    MQIACH_PROTOCOL
    The communication protocol supported by the channel.

    MQIACH_SSL_CLIENT_AUTH
    TLS client authentication.

    MQIACH_USE_CLIENT_ID
    Specify whether to use the clientID of a new connection as the userID for that connection

    MQIACH_XMIT_PROTOCOL_TYPE
    Transport (transmission protocol) type

Note:

  1. Only one of the following parameters can be specified:

    • MQCACH_JAAS_CONFIG
    • MQCACH_MCA_USER_ID
    • MQIACH_USE_CLIENT_ID

If none of these parameters are specified, no authentication is performed. If MQCACH_JAAS_CONFIG is specified, the client flows a user name and password, in all other cases the flowed user name is ignored.


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_CHANNEL_NAME_ERROR
      Channel name error.

      MQRCCF_CHANNEL_NOT_FOUND
      Channel not found.

      MQRCCF_CHANNEL_TYPE_ERROR
      Channel type not valid.

Parent topic: Definitions of the Programmable Command Formats