Tracing the Advanced Message Queuing Protocol (AMQP) Service

The trace facility provided by the Advanced Message Queuing Protocol (AMQP) Service is provided to help IBM Support to diagnose customer issues related to the service.


There are two ways to control trace for the IBM MQ AMQP service:

  • By using the strmqtrc and endmqtrc commands to start and stop trace.

    From IBM MQ Version 9.2.0, we can restrict trace output to the AMQP service only by specifying the -t parameter with the amqp option.

    Enable trace using the strmqtrc command without the -t parameter with the amqp option generates trace information for the entire queue manager where the IBM MQ AMQP service is running. This includes the IBM MQ AMQP service itself, and the underlying Java Message Queuing Interface (JMQI) that the service uses to communicate with other queue manager components.

  • By running the controlAMQPChannel command. Turning trace on using the controlAMQPChannel command traces only the IBM MQ AMQP service.

If we are unsure which option to use, contact the IBM Support representative and they will be able to advise you on the best way to collect trace for the issue that we are seeing.


Procedure

  1. Method one
    1. Bring up a command prompt and navigate to the directory: MQ_INSTALLATION_PATH\bin
    2. Run the strmqtrc command to enable trace: From IBM MQ Version 9.2.0, to restrict trace output to the AMQP service only, run the following command:
      strmqtrc -m qmgr_name -t amqp
      where qmgr_name is the name of the queue manager where the IBM MQ AMQP service is running, and -t amqp restricts trace output to the AMQP service only. Running the strmqtrc command without the -t parameter and the amqp option generates trace information for the entire queue manager where the IBM MQ AMQP service is running.
    3. Reproduce the issue.
    4. Stop trace, by running the endmqtrc command:
      endmqtrc -m qmgr_name

  2. Method two.
    1. Bring up a command prompt and navigate to the directory: MQ_INSTALLATION_PATH\bin
    2. Run the following command to enable trace:

      • controlAMQPChannel -qmgr=qmgr_name -mode=starttrace
      • ./controlAMQPChannel.sh -qmgr=qmgr_name -mode=starttrace

      where qmgr_name is the name of the queue manager where the AMQP Service is running.

    3. Reproduce the issue.
    4. When the issue occurs, stop trace by running the following command:

      • controlAMQPChannel -qmgr=qmgr_name -mode=stoptrace
      • ./controlAMQPChannel.sh -qmgr=qmgr_name -mode=stoptrace [clientid=ClientIdentifier]

      where qmgr_name is the name of the queue manager where the AMQP Service is running.


Results

To view the trace output, go to the following directory:

  • MQ_DATA_PATH\trace.
  • /var/mqm/trace.

Before IBM MQ Version 9.2.0, the trace files containing the information from the AMQP Service are called amqp_N.trc, where N is a number.

From IBM MQ Version 9.2.0, the trace files are named as follows:

  • The trace files containing the information from the AMQP service are called amqpRunMQXRService_PPPPP.N.trc, where PPPPP is the process identifier for the AMQP service and N is a number.
  • The trace files containing the information from the controlAMQPChannel command are called amqpControlMQXRChannel_PPPPP.N.trc, where PPPPP is the process identifier for the AMQP service and N is a number.

Trace information generated by the JMQI is written to a trace file called amqp_PPPPP.trc, where PPPPP is the process identifier for the AMQP Service.

Parent topic: Use trace