Inquire Channel Status (AMQP)

The Inquire Channel Status (MQCMD_INQUIRE_CHANNEL_STATUS) (AMQP) command inquires about the status of one or more AMQP channel instances.

You must specify the name of the channel for which you want to inquire status information. This name can be a specific channel name or a generic channel name. By using a generic channel name, you can inquire either:
  • Status information for all channels, or
  • Status information for one or more channels that match the specified name.

If the ClientIdentifier parameter is not specified, the output of the Inquire Channel Status command is a summary of statuses of all clients connected to the channel. One PCF response message is returned per channel.

If the ClientIdentifier parameter is specified, separate PCF response messages are returned for each client connection. The ClientIdentifier parameter may be a wildcard, in which the status for all clients that match the ClientIdentifier string is returned.

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 objects which have names that start with the selected character string. An asterisk on its own matches all possible names.

The channel name is always returned, regardless of the instance attributes requested.

The maximum length of the string is MQ_CHANNEL_NAME_LENGTH.

ChannelType (MQCFIN)
Channel type (parameter identifier: MQIACH_CHANNEL_TYPE).
The value must be:
MQCHT_AMQP
AMQP

Optional parameters

ChannelInstanceAttrs (MQCFIL)
Channel instance attributes (parameter identifier: MQIACH_CHANNEL_INSTANCE_ATTRS).

The ChannelInstanceAttrs parameter names the list of attributes to be returned. This parameter does not provide any way to select, based upon the value of the items in that list of attributes.

The attribute list might specify the following value on its own:
MQIACF_ALL
All attributes.
MQIACF_ALL is the default value used if the parameter is not specified or it can specify a combination of the following:
  • Relevant for summary status, applicable when you do not specify a ClientIdentifier parameter.
    The following information applies:
    MQCACH_CHANNEL_NAME
    Channel name
    MQIACH_CHANNEL_TYPE
    Channel type
    MQIACF_CONNECTION_COUNT
    Number of connections described in the summary
    MQIACH_CHANNEL_STATUS
    Current status of the client
  • Relevant for client details mode, applicable when you do specify a ClientIdentifier parameter.
    The following information applies:
    MQCACH_CHANNEL_NAME
    Channel name
    MQIACH_CHANNEL_STATUS
    Current status of the client
    MQIACH_CHANNEL_TYPE
    Channel type
    MQCACH_CONNECTION_NAME
    Name of the remote connection (IP address)
    MQIACH_AMQP_KEEP_ALIVE
    Keep alive interval of the client
    MQCACH_MCA_USER_ID
    Message channel agent user Id
    MQIACH_MSGS_SENT
    Number of messages sent by the client since it last connected
    MQIACH_MSGS_RECEIVED or MQIACH_MSGS_RCVD
    Number of messages received by the client since it last connected
    MQCACH_LAST_MSG_DATE
    Date last message was received or sent
    MQCACH_LAST_MSG_TIME
    Time last message was received or sent
    MQCACH_CHANNEL_START_DATE
    Date channel started
    MQCACH_CHANNEL_START_TIME
    Time channel started
ClientIdentifer (MQCFST)
The ClientId of the client (parameter identifier: MQCACH_CLIENT_ID).

The maximum length of the string is MQ_CLIENT_ID_LENGTH.

Summary mode

If you do not specify a ClientIdentifier parameter, the following fields are returned:

MQCACH_CHANNEL_NAME
The channel name.
MQIACH_CHANNEL_TYPE
The channel type of AMQP.
MQIACF_CONNECTION_COUNT
The number of connections described in the summary.
MQIACH_CHANNEL_STATUS
The current status of the client.

Client details mode

If you specify a ClientIdentifier parameter, the following fields are returned:

MQIACH_CHANNEL_STATUS
The current status of the client.
MQCACH_CONNECTION_NAME
The name of the remote connection, that is, the IP address.
MQIACH_AMQP_KEEP_ALIVE
The keep alive interval of the client.
MQCACH_MCA_USER_ID
Message channel agent user Id.
MQIACH_MSGS_SENT
Number of messages sent by the client since it last connected.
MQIACH_MSGS_RECEIVED or MQIACH_MSGS_RCVD
Number of messages received by the client since it last connected.
MQCACH_LAST_MSG_DATE
Date last message was received or sent.
MQCACH_LAST_MSG_TIME
Time last message was received or sent.
MQCACH_CHANNEL_START_DATE
Date channel started.
MQCACH_CHANNEL_START_TIME
Time channel was started.
MQIACH_PROTOCOL
AMQP protocol supported by this channel.

Error code

This command might return the following error code 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_CHL_INST_TYPE_ERROR
Channel instance type not valid.
MQRCCF_CHL_STATUS_NOT_FOUND
Channel status not found.
MQRCCF_XMIT_Q_NAME_ERROR
Transmission queue name error.